comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Extended return question
Date: Fri, 11 Jul 2008 09:39:50 +0200
Date: 2008-07-11T09:39:51+02:00	[thread overview]
Message-ID: <1q2ekbsy00n1q.su55mffvj33u$.dlg@40tude.net> (raw)
In-Reply-To: wccabgpqmhu.fsf@shell01.TheWorld.com

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.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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