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!news1.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Constructor functions and extension aggregate Date: Wed, 12 Mar 2008 11:02:19 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <76387782-e2f7-4b9c-ba73-4c698ba8e26b@u69g2000hse.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: pcls4.std.com 1205334140 24608 192.74.137.71 (12 Mar 2008 15:02:20 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 12 Mar 2008 15:02:20 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:nyG8kiJr/mtuQbv/wjt9xZvCiUA= Xref: g2news1.google.com comp.lang.ada:20316 Date: 2008-03-12T11:02:19-04:00 List-Id: christoph.grein@eurocopter.com writes: > 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: >> >> � �return (Name => To_Unbounded_String (Name), others => <>); >> >> Shouldn't it be rather: >> >> � �return (Ada.Finalization.Limited_Controlled with >> � � � Name => 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 => To_Unbounded_String (Name), others => <>); Yes, that's what I meant. - Bob