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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5a88548f1bcf3510 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.66.86.138 with SMTP id p10mr2766380paz.14.1353314467957; Mon, 19 Nov 2012 00:41:07 -0800 (PST) Path: s9ni24809pbb.0!nntp.google.com!news.glorb.com!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Overring function and its returned type Date: Mon, 19 Nov 2012 09:41:04 +0100 Organization: Ada @ Home Message-ID: References: <97a6946f-a707-4dd3-872b-9e851fcf9462@googlegroups.com> <62ba75d8-8a6c-4d75-be37-3322f683714d@googlegroups.com> <8998c0eb-c9b1-4501-9163-94172aa4aea0@googlegroups.com> <5533c59b-24a1-41ae-8a7c-674e3cdcbecc@googlegroups.com> NNTP-Posting-Host: aWaWeUaBdaj2Zzc04J1v5A.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.10 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-11-19T09:41:04+01:00 List-Id: Le Sun, 18 Nov 2012 15:53:28 +0100, AdaMagica = a =C3=A9crit: > On Saturday, November 17, 2012 8:11:23 PM UTC+1, Robert A Duff wrote: >> "Yannick Duch=C3=AAne (Hibou57)" writes: >> > Le Fri, 16 Nov 2012 16:27:37 +0100, Maciej Sobczak >> > a =C3=A9crit: >> >> An interesting property of Ada, and what makes this issue more >> >> difficult than in C++ is that Ada supports out parameters, which = = >> from >> >> the language design point of view should work like return values.= >> > But it is not the same as a returned value. >> But it should be. > > How can this be? The actual of an out-parameter exists already, wherea= s = > the return object is newly created. He meant it, semantically. You can return a value into an already existi= ng = object, and in practice, except with purely functional languages, that's= = always how it goes (even if the target may be adjusted in some way for = many reasons). -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity