comp.lang.ada
 help / color / mirror / Atom feed
From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: Generics and Child Packages
Date: Sun, 11 Aug 2013 11:30:08 -0700 (PDT)
Date: 2013-08-11T11:30:08-07:00	[thread overview]
Message-ID: <55ebf370-8f34-406e-b30b-32c0a919be3c@googlegroups.com> (raw)
In-Reply-To: <79ec97f1-b5f8-4b12-b351-262fad685f50@googlegroups.com>

On Sunday, August 11, 2013 5:49:06 PM UTC+2, sbelm...@gmail.com wrote:
> Though I still don't buy the "children of a generic are a generic" explanation.  Semantically there is no difference between a nested package and a child package, so any reason for the latter being "officially" generic (i.e. requiring instantiation) should also apply to the former, which it clearly does not.  It's senseless that this should be okay:
> generic
> package P
> private
>    package C is
>       ...
>    end C;
> end P;

With each instantiation, you get a new C.

> but that this should be not:
>
> generic
> package P
>    ...
> end P;
>
> private package P.C is
>    ...
> end P.C;

How should P.C be related to an instantiation of P? P is not a package, only an inst. is a package. Perhaps you could dream up a rule what P.C should be, but it's not obvious.


  parent reply	other threads:[~2013-08-11 18:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-09 20:35 Generics and Child Packages sbelmont700
2013-08-10  9:25 ` AdaMagica
2013-08-10 15:39 ` Felix Krause
2013-08-11 15:49 ` sbelmont700
2013-08-11 16:51   ` Robert A Duff
2013-08-11 18:30   ` AdaMagica [this message]
2013-08-11 19:20   ` Shark8
2013-08-12 20:27   ` Randy Brukardt
2013-08-12 21:58     ` Simon Wright
2013-08-12 20:19 ` Randy Brukardt
replies disabled

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