comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Free'ing dynamic abstract tagged types..
Date: Mon, 25 Sep 2006 19:08:26 -0500
Date: 2006-09-25T19:08:26-05:00	[thread overview]
Message-ID: <tumdnU3NpLz78oXYnZ2dnUVZ_qadnZ2d@megapath.net> (raw)
In-Reply-To: 4nhic5Fajj8vU1@individual.net

"Alex R. Mosteo" <devnull@mailinator.com> wrote in message
news:4nhic5Fajj8vU1@individual.net...
> Randy Brukardt wrote:
>
> (snip)
> > Since you can't add Controlled to an inheritance tree after the fact, I
> > think that *all* tagged type trees should be derived from Controlled or
> > Limited_Controlled. (Otherwise, you're saying that the extensions don't
> > need any clean-up, which is likely to be constraining.)
>
> This is something I've wondered some times with the introduction of
> interfaces in Ada05: Could not have been defined in Ada.Finalization a
> corresponding interface? This way objects not rooted at Controlled could
> later easily add finalization.

It could have been done that way, but it would be very incompatible (so it
couldn't be done now). Two reasons: (1) [weaker] implementations use hidden
data to implement controlled types; if we're going to make implementers do
that for this one case, we should be doing it generally [that is, full
multiple inheritance] (and we were not willing to pay that implementation
price, because it would make all tagged types less efficient); (2)
[stronger] since we cannot allow hidden interfaces, any private types
implemented with controlled types would become illegal. Yuck.

Note that this question is commonly enough asked that it actually is
described in the AARM: 7.6(9.d). See
http://www.adaic.com/standards/05aarm/html/AA-7-6.html.

                                          Randy.





  reply	other threads:[~2006-09-26  0:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-21 21:08 Free'ing dynamic abstract tagged types ldb
2006-09-21 22:12 ` Randy Brukardt
2006-09-22  7:41   ` Alex R. Mosteo
2006-09-26  0:08     ` Randy Brukardt [this message]
2006-09-21 22:12 ` Robert A Duff
2006-09-22  7:21 ` Dmitry A. Kazakov
2006-09-22 21:59 ` 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