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,cced0e2ac94722f3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.73.229 with SMTP id o5mr5676519pbv.7.1325900920981; Fri, 06 Jan 2012 17:48:40 -0800 (PST) MIME-Version: 1.0 Path: lh20ni148904pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada2012 : Expression functions and extended return statements Date: Fri, 6 Jan 2012 19:47:21 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <94808f24-938b-476e-8912-f98b52982d53@j10g2000vbe.googlegroups.com> <1650969959347553100.869853martin-re.mo.ve.thedowies.com@news.btinternet.com> <1292hrynqxgnm$.12shf160d3gpi.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1325900844 10436 69.95.181.76 (7 Jan 2012 01:47:24 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 7 Jan 2012 01:47:24 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-01-06T19:47:21-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1292hrynqxgnm$.12shf160d3gpi.dlg@40tude.net... > On Fri, 06 Jan 2012 08:45:22 -0600, Martin Dowie wrote: > >> "Dmitry A. Kazakov" wrote: > >>> This is not a declaration, because the result is not an object. >> >> 2012 RM 3.1 6/3 says it is a declaration (but I should have written >> 'Result' not 'Return'). > > Surely it says so, but it is not a declaration of the result object. Yes it is, because the result object (and, as you point out, there can be more than one) is formally a separate object from whatever the result is assigned into. (This becomes obvious when the result is renamed or directly indexed, because in those cases there is no assigned object, but there still has to be a result object). This is true even for limited types; in that case, the result object "morphs" into the assigned object, but still they formally are separate objects. For other objects, the compiler can also use build-in-place and avoid materializing the result object, but in all cases it exists formally. And the result object has to be an object, because it doesn't make sense to assign into parts of something that isn't an object. I think your model of what is an object is different than Ada's (which dates back to the original Ada 80). Which is fine, but you confuse the issue when your terminology deviates from the accepted Ada meaning. Randy.