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,7eaf9f2597de2259 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-05 12:16:53 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.cwix.com!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!not-for-mail From: "Vincent Marciante" Newsgroups: comp.lang.ada References: <9pif1o01btl@drn.newsguy.com> <9pii95$jus$1@nh.pace.co.uk> <3bbd7a77.5463085@news.demon.co.uk> <3BBDE9BA.CF042BC9@boeing.com> Subject: Re: on package naming, should the word "_pkg" be part of it? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Fri, 5 Oct 2001 15:17:35 -0400 NNTP-Posting-Host: 160.79.20.98 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 1002309410 160.79.20.98 (Fri, 05 Oct 2001 19:16:50 GMT) NNTP-Posting-Date: Fri, 05 Oct 2001 19:16:50 GMT Organization: Verio Xref: archiver1.google.com comp.lang.ada:13811 Date: 2001-10-05T15:17:35-04:00 List-Id: "Jeffrey Carter" wrote in message news:3BBDE9BA.CF042BC9@boeing.com... > John McCabe wrote: > > > > type Car_Type is > > record > > .... > > end record; > > > > procedure DoSomething (Car : in out Car_Type); > > > > could be replaced by: > > > > type Car is > > record > > .... > > end record; > > > > procedure DoSomething (The_Car : in out Car); > > I recall reading articles about the psychology of understanding programs > (sorry, Robert Dewar, I don't have references for this, either. > Hopefully it's not just random neurons firing in my brain) that stated > that the first few characters of an identifier are the most important in > determining what you're reading. Having identifiers that are identical > for the first few characters requires more time and effort to > understand, and results in more errors in understanding. > > Although both _Type and The_ are ways to resolve the type/parameter name > conflict, The_ is worse because it makes the first four characters of > every parameter name the same. > > I make the type name reflect what the type contains. For example > > type Car_Info ... > > procedure P (Car : in Car_Info ... > > This is not a popular approach, though, because it requires thought > about every type name. > > -- > Jeffrey Carter What about the following: package XYZ is type Car ... procedure P (Car : in XYZ.Car ... -- Vinny