comp.lang.ada
 help / color / mirror / Atom feed
From: christoph.grein@eurocopter.com
Subject: Re: Extended return question
Date: Fri, 11 Jul 2008 02:06:17 -0700 (PDT)
Date: 2008-07-11T02:06:17-07:00	[thread overview]
Message-ID: <e03e42c8-a5dc-4f26-a3b7-cb466857bfb9@8g2000hse.googlegroups.com> (raw)
In-Reply-To: 1q2ekbsy00n1q.su55mffvj33u$.dlg@40tude.net

On 11 Jul., 09:39, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Thu, 10 Jul 2008 20:43:09 -0400, Robert A Duff wrote:
> > I don't see any problem here.  The "notion of limited type" is "do not
> > copy".  In the example below, X is created, then destroyed, then another
> > X is created, and that becomes the result.  No copying.
>
> No, we cannot say that, because
>
> A) X is not created until the constructing function returns. There is just
> no X until that point. The question is *what* was created and destroyed? It
> is improperly typed, at least.
>
> B) On the other hand, if we considered X being created, destroyed and
> created again, then the name X would resolve into two different objects in
> the same context. This would either violate the identity semantics of X or
> be semantically equivalent to an assignment of X.

I view it this way:

There is a certain storage region where something (first X) is created
and then distroyed.

There is again a certain storage region (may be the same, may be not)
where the second X is created. Only when the function returns becomes
this storage region known a the final limited object. No copying.



  reply	other threads:[~2008-07-11  9:06 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
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 [this message]
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