From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:4d43:: with SMTP id x3mr17609850qtv.326.1619451814581; Mon, 26 Apr 2021 08:43:34 -0700 (PDT) X-Received: by 2002:a25:6d02:: with SMTP id i2mr25997800ybc.309.1619451814401; Mon, 26 Apr 2021 08:43:34 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 26 Apr 2021 08:43:34 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=35.245.252.196; posting-account=XfA3zgkAAABoz6fRf3Tehtnqqr7Ycml- NNTP-Posting-Host: 35.245.252.196 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <78fd99c3-538d-4981-af11-c1885df36575n@googlegroups.com> Subject: [Ada95] Private non-generic children of generics not allowed From: Vincent Marciante Injection-Date: Mon, 26 Apr 2021 15:43:34 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61909 List-Id: [Repost with proper title] 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;