comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephe.Leake@nasa.gov>
Subject: Re: aunit?
Date: 16 Apr 2003 17:14:23 -0400
Date: 2003-04-16T21:29:16+00:00	[thread overview]
Message-ID: <u65peywk0.fsf@nasa.gov> (raw)
In-Reply-To: b7kf2o$jmo$1@a1-hrz.uni-duisburg.de

Georg Bauhaus <sb463ba@d2-hrz.uni-duisburg.de> writes:

> Stephen Leake <Stephen.A.Leake@nasa.gov> wrote:
> : 
> : If code is not "properly formatted", I sometimes
> : spend enough time being bothered by it that it's worth fixing.
> 
> In my view "worth fixing" needs careful consideration.
> The bulk of -gnaty warnings is about issues which can or
> cannot be an improvement, 

I accept ACT's definition of "good style". Because to do otherwise
takes more time than it is worth.

> depending on settings entirely outside the control of GNAT. Whether
> or not a space before a paren is a good thing depends, among other
> things, on the fonts used, and on the medium used to display the Ada
> source code.

Emacs, any fixed font. Of course :)

In general, I would recommend adapting the display tools to agree with
the "standard" definition of good style (as defined by ACT, in this case).

> (consider f (x) in most various circumstances.) Seen this way one
> might argue that -gnaty is completely unaware of any typographical
> tradition in mathematical typesetting. 

Ada source code is not meant to be typeset; that's what LaTeX is for. 

> It seems to be aware of typical font appearance in typical plain
> text editors, 

Hmph. Emacs is _not_ a plain text editor :). I would say "fixed font
in bitmapped displays".

> on typical low res displays, 

1280 by 1024; I don't think that counts as "low res".

> as preset. That is, fixed width Courier, typically _not_ by IBM, but
> by Monotype or Adobe. Or, on character terminals, aware of the
> screen font that comes with your VGA, for example.

Yes, picking a good fixed with font is critical. But I've done that.

> Consistent indentation is a different, unrelated matter.

Ok.

> I wish one could ask -gnatyX to concentrate on those aspects of
> source code which render Ada text ambigous to the human eye, like
> using l near 1 (or using l at all. Isn't there a "k instead of i in
> GNAT" policy?).

Again a matter of good font choice; no excuse for using a font in
which 1 (one) and l (letter ell) are confused.

> Source code might look familiar because of the same spacing applied
> between tokens. But does this make you familiar with the source
> code? 

No, but it helps.

> To each his own, yes. Ophelia doesn't sound like Hamlet, and that
> play will change a bit if you make them sound alike. I don't see the
> same danger for Ada source code, but I do see the time spent. My
> preference is (mostly) to learn how to read code that I haven't
> written, and only suggest -gnaty like improvements in case of a
> deeply nested mess.
> 
> -- Georg

-- 
-- Stephe



  reply	other threads:[~2003-04-16 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-05 20:45 aunit? chris.danx
2003-04-06  9:55 ` aunit? Simon Wright
2003-04-15 12:17   ` aunit? Georg Bauhaus
2003-04-15 16:06     ` aunit? Stephen Leake
2003-04-16 20:39       ` aunit? Georg Bauhaus
2003-04-16 21:14         ` Stephen Leake [this message]
2003-04-17  9:59           ` Ada programs depend on fonts (was: aunit?) Georg Bauhaus
2003-04-17 17:19             ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox