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,2b021c69b25974bd X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!postnews.google.com!u69g2000hse.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Constructor functions and extension aggregate Date: Wed, 12 Mar 2008 06:50:42 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <76387782-e2f7-4b9c-ba73-4c698ba8e26b@u69g2000hse.googlegroups.com> NNTP-Posting-Host: 80.156.44.1 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1205329842 14621 127.0.0.1 (12 Mar 2008 13:50:42 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Mar 2008 13:50:42 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u69g2000hse.googlegroups.com; posting-host=80.156.44.1; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 5.3.0.2521) Xref: g2news1.google.com comp.lang.ada:20313 Date: 2008-03-12T06:50:42-07:00 List-Id: On 12 Mrz., 14:37, Maciej Sobczak wrote: > Consider: > > http://www.adacore.com/2007/10/01/ada-gem-11/ > > The constructor function P.Make_T has: > > =A0 =A0return (Name =3D> To_Unbounded_String (Name), others =3D> <>); > > Shouldn't it be rather: > > =A0 =A0return (Ada.Finalization.Limited_Controlled with > =A0 =A0 =A0 Name =3D> To_Unbounded_String (Name)); Most probably you're right. However the theme of this gem was how to use constructor functions for limited type, not how to implement them. Thus this must be an oversight of the author. I guess he even should have said: return (Ada.Finalization.Limited_Controlled with Name =3D> To_Unbounded_String (Name), others =3D> <>);