From: Richard Riehle <rriehle@nunic.nu.edu>
Subject: Re: parameterless generics?
Date: 1996/07/17
Date: 1996-07-17T00:00:00+00:00 [thread overview]
Message-ID: <Pine.GSO.3.92.960717095430.25832A-100000@nunic.nu.edu> (raw)
In-Reply-To: 4sdou6$q1t@noc2.drexel.edu
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
next prev parent reply other threads:[~1996-07-17 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-12 0:00 parameterless generics? Brian Gilbert
1996-07-11 0:00 ` Ray Blaak
1996-07-15 0:00 ` Mark A Biggar
1996-07-11 0:00 ` Laurent Guerby
1996-07-12 0:00 ` Robert Dewar
1996-07-22 0:00 ` Mats Weber
1996-07-12 0:00 ` Theodore E. Dennison
1996-07-12 0:00 ` Philip Brashear
1996-07-14 0:00 ` Norman H. Cohen
1996-07-15 0:00 ` Chris Papademetrious
1996-07-17 0:00 ` Richard Riehle [this message]
1996-07-18 0:00 ` Martin Lorentzon
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox