comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adam@irvine.com>
Subject: Re: Extended return question
Date: Thu, 10 Jul 2008 17:03:31 -0700 (PDT)
Date: 2008-07-10T17:03:31-07:00	[thread overview]
Message-ID: <77279091-112d-46ef-9e26-f83497a66bd5@2g2000hsn.googlegroups.com> (raw)
In-Reply-To: g565jp$o2j$1@jacob-sparre.dk

On Jul 10, 4:20 pm, "Randy Brukardt" <ra...@rrsoftware.com> wrote:
> "Dale Stanbrough" <MrNoS...@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).

Where does the RM say that build-in-place is allowed for all objects?
The only place I can see that refers to build-in-place for nonlimited
objects is 7.6(21), and that permission seems to apply only to
controlled objects.

Also, the language there says that if a function call is assigned into
a target object, an anonymous object doesn't need to be created if the
value of the function call can be "safely" created in the target
object.  But "safely" isn't defined.  If the function could create
part of the target object and then terminate on an exception, as in
Dale's original example, is that considered "unsafe", which would mean
build-in-place isn't allowed for this function call?  If it doesn't
mean that, what does "safely" mean?

                                  -- Adam

(Note: I will not see any response until 7/22)





  reply	other threads:[~2008-07-11  0:03 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
2008-07-11  0:03       ` Adam Beneschan [this message]
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