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 17:55:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!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: <3BC38203.F04BF84F@san.rr.com> Message-ID: <20011009174047.V16689-100000@shell5.ba.best.com> References: <9pif1o01btl@drn.newsguy.com> <3BBD12F1.9BED0B70@acm.org> <3BC0B1D4.21C79A8@acm.org> <3BC1DB22.E127B53D@boeing.com> <20011008121837.C3733-100000@shell5.ba.best.com> <3BC38203.F04BF84F@san.rr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Wed, 10 Oct 2001 00:55:18 GMT NNTP-Posting-Host: 206.184.139.136 X-Complaints-To: abuse@verio.net X-Trace: sea-read.news.verio.net 1002675318 206.184.139.136 (Wed, 10 Oct 2001 00:55:18 GMT) NNTP-Posting-Date: Wed, 10 Oct 2001 00:55:18 GMT Organization: Verio Xref: archiver1.google.com comp.lang.ada:14106 Date: 2001-10-10T00:55:18+00:00 List-Id: On Tue, 9 Oct 2001, Darren New wrote: > > 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. > > What about endings for "T", I don't understand. > "access T", Depends on the program. I've used Ref_T, but T is a short enough type name that I don't think it's necessary to name the pointer unless you need the type and the pointer simultaneously a lot. For some reason, in my Ada code, unlike my C code, that isn't common. If you want to expose a type which has is represented by an access type, call it T. > "T'Class", and so on? Same kind of answer as above. Read the antecedent part of my if-then. "If you only have one main type in the module, then ...". I didn't claim that this is a universal, though it can work a lot of the time. 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. -- Brian