From: Vincent Marciante <vincent.marciante@l3harris.com>
Subject: but somewhat [different Ada95] _Private_ non-generic children of genevariant allowed.
Date: Mon, 26 Apr 2021 08:22:58 -0700 (PDT) [thread overview]
Message-ID: <649cc002-f0af-4824-ba68-e5c0cb2833b3n@googlegroups.com> (raw)
I pretty much follow the rational requiring children of generics that are
meant to be used by users of a generic also be generic. But what about
the case that the child is only introduced for "separation of concerns" and "information hiding" in the body of a generic package: Why can't _private_ children of a generic _always_ for use only in the implementation of the parent unit be allowed? That seems to me to be only a little more flexible
version of the allowed arrangement where the desired functionality is expressed in a body-local package that has _its_ implementation as separate stub.
So, I mean I have a situation where I like to be able to do the following but can't.
generic
...
package Generic_Package is
procedure Parent_Procedure;
...
end;
private
package Generi
_Package.Child is
procedure GPC_Procedure;
...
end;
package body Generic_Package is
...
procedure Parent_Procedure is separate;
...
end;
with Generic_Package.C
hild;
separate (Generic_Package)
procedure Parent_Procedure is
begin
...
Generic_Package.Child.GPC_Procedure;
...
end;
next reply other threads:[~2021-04-26 15:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 15:22 Vincent Marciante [this message]
2021-04-26 15:35 ` [Ada95] _Private_ non-generic children of generics not allowed Vincent Marciante
2021-04-26 15:37 ` Vincent Marciante
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox