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,259541b8a8a12b6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-28 12:17:27 PST Path: supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed.yosemite.net!news-out.cwix.com!newsfeed.cwix.com!howland.erols.net!newsfeed.mindspring.net.MISMATCH!news.mindspring.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: Bad coding standards - aesthetics are irrelevant Date: Thu, 28 Dec 2000 15:16:56 -0500 Organization: Quadrus Corporation Message-ID: <3A4B9FB8.AFD69726@acm.org> References: <3A429639.53D3EA9E@acm.org> <92fobl$f93$1@nnrp1.deja.com> NNTP-Posting-Host: d1.56.ba.3c Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 28 Dec 2000 20:17:16 GMT X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:3433 Date: 2000-12-28T20:17:16+00:00 List-Id: While one can always come up with creative solutions to this sort of thing, I think it still remains that there are going to be things about coding style and conventions that cannot be solved by algorithm. This is especially true where you get away from pure syntax and start to touch on semantics. "Adhere to such-and-such convention whenever an object refers to so-and-so..." (A certain class of constants or data items, for example.) The method you propose would work, provided that all programmers on a project correctly capitalized (according to project norms) their first use of an identifier or, as you say, create a single file that contains the most common acronyms, etc. It doesn't work the instant someone violates the conventions on a first occurence. Identifier capitalization is just one instance where automation can't universally apply and definitely not the best example because there are ways of at least mostly-automating it with some possible human intervention. There are others that can't be dealt with as easily. MDC Erik Magnuson wrote: > Way back when I wrote* an Ada pretty-printer, I used a simple rule: > Preserve the case of the 1st usage you see for each identifier and make > all the rest conform to that case. If you were processing multiple > files, you could "seed" the pretty-printer with exceptions like > Rotor_RPM. The other common approach is to have a second pass change > all of the project std. acronyms, but I thought my approach was more > general. -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Giving money and power to Government is like giving whiskey and car keys to teenage boys." -- P. J. O'Rourke ======================================================================