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-08 12:43:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!HSNX.atgi.net!sjc-peer.news.verio.net!news.verio.net!sea-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: on package naming, should the word "_pkg" be part of it? In-Reply-To: Message-ID: <20011008121837.C3733-100000@shell5.ba.best.com> References: <9pif1o01btl@drn.newsguy.com> <3BBD12F1.9BED0B70@acm.org> <3BC0B1D4.21C79A8@acm.org> <3BC1DB22.E127B53D@boeing.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Mon, 08 Oct 2001 19:43:00 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 1002570180 206.184.139.136 (Mon, 08 Oct 2001 19:43:00 GMT) NNTP-Posting-Date: Mon, 08 Oct 2001 19:43:00 GMT Organization: Verio Xref: archiver1.google.com comp.lang.ada:13962 Date: 2001-10-08T19:43:00+00:00 List-Id: On 8 Oct 2001, Stephen Leake wrote: [... snip lots of things from Stephen I agree with ...] > Yes, _T is a good choice. I'm not entirely sure why I originally chose > _Type instead of _T. At this point, there are many in the Ada comunity > that use _Type; I don't know of any that use _T. So _Type wins. I experimented with a style like this for a while, and it works fine. Also, if you accept the hypothesis that there is typically just one main type per module (yeah, I know, an Eiffelesque hypothesis) you can just use "T" for the type and use qualified names so that the package name provides the meaningful part. This kind of style is used in some Modula-3 libraries I've seen, and somewhat in (OCa)ML. [... snip ...] > As I said in another post, you can come up with alternate solutions to > any particular instance of _Type. But _Type is the simplest one that works > _everywhere_. It's nice to have one naming convention, rather than several. Exactly, and the reason, as you point out below, is that types and objects share a namespace, and this convention partitions the namespace. > Another strong argument here is that you can get used to any style, > after a while. The exact details of the style matter far less than > having a consistent style in the first place. In fact, I wouldn't want to work with someone who wasn't stylistically labile. I've already spent too much time with other C programmers who got all fanatical about brace placement. It seems that the amount of vehemence about programming language issues is inversely proportional to their importance :-). -- Brian