comp.lang.ada
 help / color / mirror / Atom feed
From: Vincent Marciante <vincent.marciante@l3harris.com>
Subject: Re: [Ada95] Private non-generic children of generics not allowed
Date: Wed, 28 Apr 2021 05:09:22 -0700 (PDT)	[thread overview]
Message-ID: <6015b52f-992e-48ce-a9b8-11d7a02bfa63n@googlegroups.com> (raw)
In-Reply-To: <e5538816-83ed-4fbb-bcc3-6051a5482c6en@googlegroups.com>

On Monday, April 26, 2021 at 1:16:26 PM UTC-4, AdaMagica wrote:
> Vincent Marciante schrieb am Montag, 26. April 2021 um 18:53:09 UTC+2: 
> > On Monday, April 26, 2021 at 12:41:47 PM UTC-4, AdaMagica wrote: 
> > > Children of generic packages are also generic. 
> > I do understand that that is the current stipulation. My question is rational 
> > for including the private children. It seems that a child arrangement such as 
> > I presented (non-generic but _private_) would not have caused any problems 
> > and might have been allowable. So, why not?
> Generic packages are not packages. So a child of a generic package cannot be a package. This is the logic. 
> I do not know what rules would have to be defined for making this allowed.

Considering private children of generic to be "per instance" would allow the body of 
a generic to be less cluttered - not having to textually contain the spec of the child 
and would allow more flexible/restrictable visibility: any (separate) unit that needs 
to see the private child unit (and only those units) could then "with" the unit.

Currently, one would have to make the private child unit generic and then instantiate
it in the body of the parent at a place were all subunits that require its use can see it,
however, that might cause either (1) a less-than-preferable ordering of units in the body 
or (2) more-than desired visibility of the unit. 

Because the above can be done and ends up being very similar to the/my desired 
arrangement (with the added costs described previously) why not arrange to allow 
private non-generic children of a generic?

  reply	other threads:[~2021-04-28 12:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 15:43 [Ada95] Private non-generic children of generics not allowed Vincent Marciante
2021-04-26 16:41 ` AdaMagica
2021-04-26 16:53   ` Vincent Marciante
2021-04-26 17:16     ` AdaMagica
2021-04-28 12:09       ` Vincent Marciante [this message]
2021-04-28 17:57         ` AdaMagica
2021-04-29  8:57 ` AdaMagica
2021-04-29 10:20   ` Vincent Marciante
2021-04-29 11:02     ` Egil H H
2021-04-29 17:17       ` Vincent Marciante
2021-04-29 17:43         ` AdaMagica
2021-04-29 19:29           ` Vincent Marciante
2021-04-30 12:56             ` AdaMagica
2022-04-28  0:07               ` Thomas
2022-05-19 19:59                 ` Indra Anita
replies disabled

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