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: a07f3367d7,2c1aef7e0a2350d1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z14g2000yqa.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Extending a type and Finalization Date: Fri, 5 Jun 2009 06:14:30 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <303a64d4-2fdd-47fe-ae4b-3ddf1912cffe@f19g2000yqh.googlegroups.com> <02bb50df-d833-4b08-8f12-a3b10d7dcd78@n8g2000vbb.googlegroups.com> <5dbd97d8-ab49-4316-b531-23b28fc2af7b@k8g2000yqn.googlegroups.com> <3d991397-94e5-4dd5-8712-a1fe5b1d234c@t21g2000yqi.googlegroups.com> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1244207670 18975 127.0.0.1 (5 Jun 2009 13:14:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 5 Jun 2009 13:14:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z14g2000yqa.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6303 Date: 2009-06-05T06:14:30-07:00 List-Id: Pascal Malaise wrote on comp.lang.ada: > Thank you Ludovic. Solution 2 is fine for me. > > Concerning your recommendation, I think that the following is > compliant, or did I misunderstand something? > type T is new Ada.Finalization.Controlled with record > =A0 =A0 I : Integer; > =A0 end record; > end P; No, that complies with Dmitry's recommendation but not with mine or Jeffrey's. I prefer and recommend composition unless there is a compelling reason to use type extension. Adam's post earlier in this thread describes the composition approach. -- Ludovic Brenta.