From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,57547e48b4c4d9b8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-16 14:26:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: aunit? Date: 16 Apr 2003 17:14:23 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1050528556 6769 128.183.235.92 (16 Apr 2003 21:29:16 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 16 Apr 2003 21:29:16 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:36215 Date: 2003-04-16T21:29:16+00:00 List-Id: Georg Bauhaus writes: > Stephen Leake 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