From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Indefinite Containers of Indefinite Private Types
Date: Thu, 6 Aug 2015 13:49:09 -0500
Date: 2015-08-06T13:49:09-05:00 [thread overview]
Message-ID: <mq0a76$9q6$1@loke.gir.dk> (raw)
In-Reply-To: mpr8rn$33n$1@dont-email.me
"Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org> 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.
next prev parent reply other threads:[~2015-08-06 18:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 2:23 Indefinite Containers of Indefinite Private Types Jeffrey R. Carter
2015-08-04 5:40 ` Niklas Holsti
2015-08-04 18:56 ` Jeffrey R. Carter
2015-08-04 20:47 ` Randy Brukardt
2015-08-04 20:56 ` Jeffrey R. Carter
2015-08-06 18:49 ` Randy Brukardt [this message]
2015-08-06 20:12 ` Jeffrey R. Carter
2015-08-07 19:49 ` Randy Brukardt
2015-08-07 20:13 ` Bob Duff
2015-08-07 20:45 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox