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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,46474020a5b291b7 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 25 Sep 2006 19:08:06 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1158872883.994303.80430@b28g2000cwb.googlegroups.com> <4nhic5Fajj8vU1@individual.net> Subject: Re: Free'ing dynamic abstract tagged types.. Date: Mon, 25 Sep 2006 19:08:26 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-kO1rmux6FMsq6AbWt7CyqxjtHSh+MrVE4SucE+uAru2TbBSF5m5mZzjnHQrKl6ZAOPrGicI4DL2e1VW!RmFpjNotkgSeovcTSB+nYbRPAlycXtEuhK0ImaZmYW3dZU5YgJ3pf18nrzEEyf+3WzZVs4IkCMqa!6j5UZZnfkMmbRA== X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:6735 Date: 2006-09-25T19:08:26-05:00 List-Id: "Alex R. Mosteo" 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.