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=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no 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 08:20:06 PST Path: supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!feed2.onemain.com!feed1.onemain.com!news-out.cwix.com!newsfeed.cwix.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Erik Magnuson Newsgroups: comp.lang.ada Subject: Re: Bad coding standards - aesthetics are irrelevant Date: Thu, 28 Dec 2000 16:05:13 GMT Organization: Deja.com Message-ID: <92fobl$f93$1@nnrp1.deja.com> References: <3A429639.53D3EA9E@acm.org> NNTP-Posting-Host: 38.218.185.1 X-Article-Creation-Date: Thu Dec 28 16:05:13 2000 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) X-Http-Proxy: 1.1 x58.deja.com:80 (Squid/1.1.22) for client 38.218.185.1 X-MyDeja-Info: XMYDJUIDmaderikm Xref: supernews.google.com comp.lang.ada:3424 Date: 2000-12-28T16:05:13+00:00 List-Id: In article <3A429639.53D3EA9E@acm.org>, Marin David Condic wrote: > Not everything about style - including asthetics - can be resolved effectively > by a machine. For example, you might have an identifier: Rotor_RPM. Automatic > case rules would have a hard time noting that RPM is an abbreviation and > should be upper case. Or it could just preserve case as it was given, but then > what stops someone from writing rotor_rpm which might violate the coding > conventions? 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. -- Erik * OK, I did not write it from scratch. I modified one of the ones from the old Ada source code archive. Sent via Deja.com http://www.deja.com/