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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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 19:18:47 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub2.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail Reply-To: "DuckE" From: "DuckE" 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.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Fri, 15 Dec 2000 03:18:45 GMT NNTP-Posting-Host: 24.6.221.63 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 976850325 24.6.221.63 (Thu, 14 Dec 2000 19:18:45 PST) NNTP-Posting-Date: Thu, 14 Dec 2000 19:18:45 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:3157 Date: 2000-12-15T03:18:45+00:00 List-Id: [snip] > is not so terrible. Given the choice of the following > three possibilities in the GNAT compiler context: > > Analyze_Type_Declaration; > SC3.Analyze_Type_Declaration; > Semantics_For_RM_Ch_3.Analyze_Type_Declaration; > > I prefer the first one, since anyone who knows > anything about the structure of GNAT knows where > Analyze_Type_Declaration is declared, and if you > don't know, you can press the appropriate key in > GLIDE and be bounced to the right package (or use > gnatfind to quickly find the right package if you > are not using an IDE). > > I really find the last one horrible. Lots of noise > here that would greatly increaes the length of the > code and add nothing. > > THe middle one is a bit of an oddity. It adds nothing > to the readability, but I can see it being useful in > a junk environment which did NOT have good navigation > tools, since you can use the plain editor search > capability to locate the renaming statement. This is the most common reaction we receive when someone new enters our software group where we have standards that require a 3 character mnemonic as a part of all identifiers that are defined in package specs. Usually within a week of using this convention, they don't know how they ever worked without it. If I am reading some code that includes (using from the example above): SC3.Analyze_Type_Declaration; I immediately know that this is a procedure that is defined outside of the current package in something that is abbreviated as "SC3". If the code contained just: Analyze_Type_Declaration; Then I would know that this is a procedure that is either defined locally or in another package. To find out which, I'll have to do some investigation. I have found that when these conventions are followed I can move through unfamiliar code very quickly without having to research each identifier. FWIW SteveD > > So in context I do not think this usage is > necessarily a bad idea. > > Robert Dewar > > > Sent via Deja.com > http://www.deja.com/