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,30fad28eb8886cca X-Google-Attributes: gid103376,public From: Richard Riehle Subject: Re: parameterless generics? Date: 1996/07/17 Message-ID: #1/1 X-Deja-AN: 168616960 references: <4s48k9$3be$1@mhafn.production.compuserve.com> <4sdou6$q1t@noc2.drexel.edu> content-type: TEXT/PLAIN; charset=US-ASCII organization: National University, San Diego mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-07-17T00:00:00+00:00 List-Id: On Mon, 15 Jul 1996, Chris Papademetrious wrote: > Brian Gilbert <71413.1453@CompuServe.COM> wrote: > > I believe if you create a child library of a generic package (pardon > my butchering of the terminology, I'm new to Ada 95), the child itself > must also be generic. Oftentimes, the child won't need a generic > parameter of its own, only needing that of its parent, in which case > you'd get the interesting construct: > > generic > package Blah is... > If you think you are gong to need child units, consider nesting the generic package inside a non-generic package. Example: package Chopin is [ declare exportable services ] generic [ optional parameter list ] package Keyboard_Manager is [ declare exportable services ] end Keyboard_Manager; [ addtionally declared exportable services ] end Chopin; and then create children, package Chopin.Polonaise is ... package Chopin.Mazurka is ... and so on. I realize there are those who might object to this style, but there is actually precedent for it in Annex A of the (ISO 8652:1995) Ada Language Reference Manual. Richard Riehle AdaWorks Software Engineering Palo Alto, CA