comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Extended return question
Date: Thu, 10 Jul 2008 18:20:11 -0500
Date: 2008-07-10T18:20:11-05:00	[thread overview]
Message-ID: <g565jp$o2j$1@jacob-sparre.dk> (raw)
In-Reply-To: MrNoSpam-BCD9C2.17322110072008@news-server.bigpond.net.au

"Dale Stanbrough" <MrNoSpam@bigpoop.net.au> wrote in message 
news:MrNoSpam-BCD9C2.17322110072008@news-server.bigpond.net.au...
> Georg Bauhaus wrote:
>
>> Dale Stanbrough wrote:
>> > The purpose of an extended return is to create the values in-situ
>> > without copying.
>>
>> _Limited_ objects can be initialized in situ by an aggregate
>> or function call  ... :-)
>
>
> Ah, thanks.  I had misread John Barnes comments on this. Why such a
> restriction? Why not allow it for all extended returns on all types?

Build-in-place is *allowed* for all objects; it is only *required* for types 
that always have to be limited (now known as "immutably limited types" (see 
AI05-0052-1).

The reason it is not required is that the function could be used in an 
assignment statement, and in that case, it doesn't make sense to require 
build-in-place. And trying to have a function that works both ways could be 
expensive to implement (the calling conventions are very different).

                                 Randy.





  parent reply	other threads:[~2008-07-10 23:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-10  2:11 Extended return question Dale Stanbrough
2008-07-10  7:18 ` Georg Bauhaus
2008-07-10  7:32   ` Dale Stanbrough
2008-07-10 15:24     ` Adam Beneschan
2008-07-10 23:56       ` Dale Stanbrough
2008-07-10 23:20     ` Randy Brukardt [this message]
2008-07-11  0:03       ` Adam Beneschan
2008-07-11  0:50         ` Robert A Duff
2008-07-10 14:37 ` Robert A Duff
2008-07-10 15:19   ` Adam Beneschan
2008-07-10 18:36     ` Dmitry A. Kazakov
2008-07-11  0:43       ` Robert A Duff
2008-07-11  7:39         ` Dmitry A. Kazakov
2008-07-11  9:06           ` christoph.grein
2008-07-11 14:24             ` Dmitry A. Kazakov
2008-07-11  0:29     ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox