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-09 19:28:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!cyclone.bc.net!sjcppf01.usenetserver.com!usenetserver.com!easynews!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: <9q09d801073@drn.newsguy.com> Message-ID: <20011009191925.B16689-100000@shell5.ba.best.com> References: <9pif1o01btl@drn.newsguy.com> <3BBD12F1.9BED0B70@acm.org> <20011009174047.V16689-100000@shell5.ba.best.com> <9q09d801073@drn.newsguy.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Wed, 10 Oct 2001 02:28:06 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 1002680886 206.184.139.136 (Wed, 10 Oct 2001 02:28:06 GMT) NNTP-Posting-Date: Wed, 10 Oct 2001 02:28:06 GMT Organization: Verio Xref: archiver1.google.com comp.lang.ada:14108 Date: 2001-10-10T02:28:06+00:00 List-Id: On 9 Oct 2001, it was written: > In article <20011009174047.V16689-100000@shell5.ba.best.com>, Brian says... > > > > >The meta idea is that the type name is > >completely generic, like naming tagged types "Class" (hmmm) or "Object" > >(awful) and the meaningful part of the name is pushed onto the package > >name. > > > >A nastier objection is that many modules have more than one exported type, > >and not even one that can be called the "main" one. In that case you can > >still use an "_T" suffix, but since those Ada programmers who prefer a > >suffix have gravitated towards "_Type" I think that it makes more sense to > >just use that if you are so inclined. > > > I think all of the above is a side-effect of trying to make Ada look like > the other 'normal' OO languages, in which the class is the basic and > primary building block in the program, and not the package. In Ada the > package is the basic building block in the program. Only the "T" convention, which I admit was influenced by, among other things, my reading of "Object Oriented Software Construction". There's some rule there about one type per module. The "_Type" convention, as Stephen Leake pointed out, is simply a convention for putting type names in a different namespace. "_T" or even "_Blech" works fine, but as I said "_Type" is widely used and we don't work in a vacuum so if you must choose for real programs I'd strongly advise you to choose that. I just played around with the "T" convention in code that I never planned to release to see how I liked it. As far as an "objectmethod" syntax for classes goes, I don't think this is a big deal, but you could be right. I'm relatively insensitive to syntax choices, but apparently lots of people aren't. I think Tucker Taft proposed a more conventional syntax for "method" calls for an Ada 0X but I forget where I saw it. -- Brian