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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f8a440310f7f2e02 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Extended return question Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <69940bd4-74f7-4b00-93d6-482c7394fcef@34g2000hsf.googlegroups.com> <1pdpniur1w9sq$.1a9h7prydviae$.dlg@40tude.net> <1q2ekbsy00n1q.su55mffvj33u$.dlg@40tude.net> Date: Fri, 11 Jul 2008 16:24:49 +0200 Message-ID: <1khcdi9zpfer6$.3fhslz3rzdif$.dlg@40tude.net> NNTP-Posting-Date: 11 Jul 2008 16:24:49 CEST NNTP-Posting-Host: 715ee38a.newsspool4.arcor-online.net X-Trace: DXC=FMTT6\mQ5iG6PJ?[X6JIXE4IUK\BH3YB4^Scn1J8k9IDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBM;=mS@O5DSK X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:1113 Date: 2008-07-11T16:24:49+02:00 List-Id: On Fri, 11 Jul 2008 02:06:17 -0700 (PDT), christoph.grein@eurocopter.com wrote: > On 11 Jul., 09:39, "Dmitry A. Kazakov" > 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. But there cannot be first and second X, when X is limited! The object X is *one* object. It must be created strictly once. It can change its state, but it cannot disappear and reappear, that is not state change. So the question stands: what was created and then destroyed? The following question is: what is the type of that thing (which the type cannot be T.) > 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. I don't think that limitmess is only about copying. It is rather about keeping the identity of the object. The latter implies the former but not necessarily reverse. When I see a sequence Initialize - Finalize - Initialize attributed to the same object, that is a sequence of assignment to me. The storage region used is in my view irrelevant here. I agree with Adam that "limitness" may allow moving bit patterns in the memory. It is OK, because the identity of a limited object is not necessarily the memory address, though an implementation may choose memory location for this purpose. So the issue boils down to the meaning of "in-place." -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de