From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Indefinite Containers of Indefinite Private Types Date: Thu, 6 Aug 2015 13:49:09 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1438886951 10054 24.196.82.226 (6 Aug 2015 18:49:11 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 6 Aug 2015 18:49:11 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:27377 Date: 2015-08-06T13:49:09-05:00 List-Id: "Jeffrey R. Carter" wrote in message news:mpr8rn$33n$1@dont-email.me... > On 08/04/2015 01:47 PM, Randy Brukardt wrote: ... >> One could imagine having a declaration for the generic (perhaps an >> aspect?) >> that would allow such instantiations (and disallow such objects), but >> again >> there has been little traction for such proposals, all of which are quite >> complex to describe and implement. > > I can guess so. Probably a new generic formal type would be desired. > Meanwhile > I'll put up with the noise. That's one possibility. We could call it a generic private type. Oops -- that name is taken, and alternative names are annoying. (The idea of course would be similar to the generic incomplete type; the restrictions on the use of a private type would be enforced on the uses of the generic formal type.) We've also looked at declarations (maybe an aspect) for the generic as a whole, there was a proposal for a "forward" declaration for the generic (that is, you'd be able to separate the visible part of the generic from the actual instance, just like in other kinds of packages), and a proposal to change the freezing to be exactly like a macro (meaning a break in the contract model, and a horror to implement on top of that). We also found that there is a workaround of sorts using a child package to hold the instantiation, which works so long as the private type doesn't use something from the instantiation (usually a cursor for a container) in its full declaration. The existence of the workaround lowers the priority of finding a fix, and given the difficulty of doing so, we pretty much gave up. I'm sure we'll revisit it someday. Randy.