From: sean@graph.es.hac.com (Sean McNeil)
Subject: Re: Generic child units with Gnat
Date: 1995/03/31
Date: 1995-03-31T00:00:00+00:00 [thread overview]
Message-ID: <SEAN.95Mar31090715@graph.es.hac.com> (raw)
In-Reply-To: 3le685$l9h@Starbase.NeoSoft.COM
In article <3le685$l9h@Starbase.NeoSoft.COM> dweller@Starbase.NeoSoft.COM (David Weller) writes:
> --File: complexnumbers-polar.ads
> generic
> package ComplexNumbers.Polar is
> procedure bar( Dummy : in FloatType);
> end ComplexNumbers.Polar;
>
> ...
>
> --Filename foobar.adb
> with ComplexNumbers.Polar; -- auto visibility to parent
> procedure FooBar is
> package RealComplexNumbers is new ComplexNumbers( Float);
> package PolarRealComplexNumbers is new RealComplexNumbers.Polar;
> begin -- FooBar
> null;
> end FooBar;
>
Since it appears that ComplexNumbers.Polar is only dependant on FloatType
from the parent package, wouldn't the following be better?
--File: complexnumbers-polar.ads
package ComplexNumbers.Polar is
procedure bar( Dummy : in FloatType);
end ComplexNumbers.Polar;
--Filename foobar.adb
with ComplexNumbers.Polar; -- auto visibility to parent
procedure FooBar is
package RealComplexNumbers is new ComplexNumbers( Float);
package PolarRealComplexNumbers renames RealComplexNumbers.Polar;
begin -- FooBar
null;
end FooBar;
One less generic instantiation.
Sean McNeil
smcneil@netcom.com
next prev parent reply other threads:[~1995-03-31 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-27 7:39 Generic child units with Gnat Fintan Culwin
1995-03-30 0:00 ` David Weller
1995-03-31 0:00 ` Sean McNeil [this message]
1995-04-04 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox