comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: A good way to name instantiated children?
Date: Sat, 21 Jun 2003 09:12:14 +0200
Date: 2003-06-21T09:12:14+02:00	[thread overview]
Message-ID: <bd10b4$nr5c5$1@ID-77047.news.dfncis.de> (raw)
In-Reply-To: u65n0h31n.fsf@nasa.gov

Stephen Leake wrote:

> I solve this by prefixing Gen_ to the generic package names:
> 
> generic
>     type Number is private;
> package Gen_A is ...
> 
> generic
> package Gen_A.Gen_B is ...
> 
> Then the instantiations can be:
> 
> with Gen_A;
> package Float_A is new Gen_A (Float);
> 
> with Gen_A.Gen_B;
> package Float_A.B is new Float_A.Gen_B;
> 
> Yes, the Gen_A.Gen_B.Gen_C.Gen_D is a little ugly. But the
> instantiation names are nice, which is more important. And it makes it
> clear from the package name whether the package is generic or not,
> which is also helpful.

Actually I am already calling the root generic packages Generic_Something. 
But I somehow missed the very fact that generic children are indeed 
generic! (:-)).

It is a good idea, thank you!

-- 
Regards,
Dmitry A. Kazakov
www.dmitry-kazakov.de



      parent reply	other threads:[~2003-06-21  7:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-20 15:51 A good way to name instantiated children? Dmitry A. Kazakov
2003-06-20 21:06 ` Stephen Leake
2003-06-21  6:48   ` Simon Wright
2003-06-21 19:43     ` Jeffrey Carter
2003-06-23 13:39       ` Stephen Leake
2003-06-21  7:12   ` Dmitry A. Kazakov [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox