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: a07f3367d7,5a88548f1bcf3510 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.224.105.205 with SMTP id u13mr8553166qao.6.1353330265707; Mon, 19 Nov 2012 05:04:25 -0800 (PST) Received: by 10.49.34.135 with SMTP id z7mr2501036qei.1.1353330265688; Mon, 19 Nov 2012 05:04:25 -0800 (PST) Path: gf5ni327qab.0!nntp.google.com!u2no12699964qal.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 19 Nov 2012 05:04:25 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.7.125.193; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 91.7.125.193 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <687a06e4-3545-444d-9fbe-4e2e5f7055f2@googlegroups.com> Subject: Re: Overring function and its returned type From: AdaMagica Injection-Date: Mon, 19 Nov 2012 13:04:25 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-11-19T05:04:25-08:00 List-Id: On Monday, November 19, 2012 9:41:07 AM UTC+1, Hibou57 (Yannick Duch=EAne) = wrote: > > How can this be? The actual of an out-parameter exists already, whereas= =20 > > the return object is newly created. >=20 > He meant it, semantically. You can return a value into an already existin= g =20 > object, and in practice, except with purely functional languages, that's = =20 > always how it goes (even if the target may be adjusted in some way for = =20 > many reasons). >From this point of view, they are semantically the same in Ada. But for me,= it's a non sequitur. An out parameter as an update is like an assignment A :=3D B; hidden inside= some procedure; a return object is constructed somehow. This is fundamenta= lly different for me. Is (1) equal to (2): declare A: T :=3D Some_Value; -- (1) begin A :=3D Some_Value; -- (2)