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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,63a41ccea0fc803a X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/07/29 Message-ID: #1/1 X-Deja-AN: 376001810 References: <6pdhfo$1br$1@platane.wanadoo.fr> <6pi0pf$df8$1@nnrp1.dejanews.com> <6pirk1$iar$1@nnrp1.dejanews.com> <6pknai$qst$1@nnrp1.dejanews.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 901721700 7425 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-07-29T00:00:00+00:00 List-Id: On Wed, 29 Jul 1998, Matthew Heaney wrote: > Brian Rogoff writes: > > On Tue, 28 Jul 1998, Brian Rogoff wrote: > > > My issue with this is that I often coencapsulate types, and sometimes > > > there is no main type in a package, though I suppose thats easy enough to > > > fix by using T,U,V,W, ... or T1, T2, T3, ... > > > > Oops, I forgot to put a string of ":-)" here! > > But you bring up a good point. Frequently, there are types that are > cohesive enough that they really belong together in the same package. > An example is a data structure (say a stack or queue) and its associated > active iterator, connected by a factory method. Thats one good example, and thats why the joking suggestion about numbering the type names should have gotten a smiley. Another similar example is the "index" type of a random access collection. I find that violations of the one-main-type-per-package rule occur very frequently. What I have done in my own generic collection libraries, whose source you can peruse at http://www.best.com/~bpr/agl.html, is stick the iterators in child packages of the collection, so I suppose I could make the T convention work, if I wanted to. -- Brian