comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <sb463ba@d2-hrz.uni-duisburg.de>
Subject: Re: aunit?
Date: Wed, 16 Apr 2003 20:39:52 +0000 (UTC)
Date: 2003-04-16T20:39:52+00:00	[thread overview]
Message-ID: <b7kf2o$jmo$1@a1-hrz.uni-duisburg.de> (raw)
In-Reply-To: uwuhvwxs8.fsf@nasa.gov

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, 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. (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. It seems to be aware of typical font appearance
in typical plain text editors, on typical low res displays, 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.

Consistent indentation is a different, unrelated matter.

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?).

Source code might look familiar because of the same spacing
applied between tokens. But does this make you familiar with
the source code? 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



  reply	other threads:[~2003-04-16 20:39 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       ` Georg Bauhaus [this message]
2003-04-16 21:14         ` aunit? Stephen Leake
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