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.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,577df5d4a0e88785 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-14 06:21:03 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!nntp.flash.net!news.flash.net!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <3A376D69.A420D711@earthlink.net> <131220001555268634%emery@mitre.org> <91agll$kup$1@nnrp1.deja.com> Subject: Re: Bad coding standards X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Thu, 14 Dec 2000 14:21:02 GMT NNTP-Posting-Host: 216.215.81.40 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 976803662 216.215.81.40 (Thu, 14 Dec 2000 08:21:02 CST) NNTP-Posting-Date: Thu, 14 Dec 2000 08:21:02 CST Organization: FlashNet Communications, http://www.flash.net Xref: supernews.google.com comp.lang.ada:3131 Date: 2000-12-14T14:21:02+00:00 List-Id: "Robert Dewar" wrote in message news:91agll$kup$1@nnrp1.deja.com... : In article <131220001555268634%emery@mitre.org>, : David Emery wrote: : > For a while, I collected coding standards as a : > hobby. I've seen some dumb ideas, but here's my : > nomination for worst idea: : > : > package Long_Descriptive_Name is : > : > package LDN renames Long_Descriptive_Name : : Interesting .. this does not seem so horrible to me. I think the key is in Mr. Emery's later statement, that there wasn't a common acronym list used to derive or track these abbreviations. Given that the project didn't have a decent code navigation tool (also implied by his description), I could see where this could be annoying (although hardly the worst idea...) My vote for "worst idea" came from a development team who was transitioning from the JOVIAL language to Ada. In JOVIAL, you could list all imported items at the top of the routine. The team thought it would be great to do this in Ada as well, so all over the place you got stuff like: with Some_Package; procedure Some_Procedure is subtype Some_Type is Some_Package.Some_Type; function "+" (Left, Right: Some_Type) return Some_Type renames Some_Package."+"; function "-" (Left, Right: Some_Type) return Some_Type renames Some_Package."+"; A: Some_Type renames Some_Package.A; ... This was miserable for several reasons: (1) It didn't always work (e.g. if the same name were used in different packages); (2) It completely cluttered the top of all declarative units, making it very easy to miss important declarations or comments; (3) It made it very easy to introduce subtle errors that often could not be caught until run-time testing (see the "-" renaming for an example), and (4) the extra complexity made it more likely for our early Ada compilers to crash. We did eventually get the code to work, though.