From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Problem in "X (1).Re := X (1).Re + 1"
Date: Tue, 8 May 2012 17:29:14 -0500
Date: 2012-05-08T17:29:14-05:00 [thread overview]
Message-ID: <joc6nt$ags$1@munin.nbi.dk> (raw)
In-Reply-To: 5209872.2691.1336497260879.JavaMail.geo-discussion-forums@ynlq12
"Adam Beneschan" <adam@irvine.com> wrote in message
news:5209872.2691.1336497260879.JavaMail.geo-discussion-forums@ynlq12...
...
>In fact, looking into this further, I think there's a problem with the AARM
>in this regard.
>A.18.2(254.a), which was from Ada 2005, says "an implementation that
>avoided copying
>until one of the containers is modified would be allowed". It seems to me
>that this is no longer
>true. I'm going to send something to Ada-Comment about this.
I think it is true, it's just that creating a reference (or for that matter,
calling Query_Element) has to be dealt with specially; they're both somewhat
like modifying an element. Query_Element is a bit less of a problem as most
ways (but not all) to modify the container while the call is active are
invalid. But it seems that the same problems can come up for it.
(Note that a copy-on-write implementation is not a good idea for the
standard containers for other reasons as well, the main one being that the
usual uses don't create many copies, so having overhead for that can't be
justified. But it should be possible to create a container with that
semantics.)
Randy.
next prev parent reply other threads:[~2012-05-08 22:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-05 12:55 Problem in "X (1).Re := X (1).Re + 1" ytomino
2012-05-07 15:37 ` Adam Beneschan
2012-05-07 18:53 ` ytomino
2012-05-07 21:28 ` Adam Beneschan
2012-05-08 1:14 ` Randy Brukardt
2012-05-08 17:14 ` Adam Beneschan
2012-05-08 22:29 ` Randy Brukardt [this message]
2012-05-09 8:41 ` ytomino
2012-05-10 0:52 ` Randy Brukardt
2012-05-10 5:23 ` ytomino
2012-05-09 9:29 ` ytomino
2012-05-10 0:58 ` Randy Brukardt
2012-05-10 4:26 ` ytomino
2012-05-15 6:09 ` Randy Brukardt
2012-05-15 20:17 ` ytomino
2012-05-16 0:01 ` Randy Brukardt
2012-05-15 22:12 ` Simon Wright
2012-05-16 7:14 ` Dmitry A. Kazakov
2012-05-09 8:05 ` ytomino
2012-05-09 11:03 ` ytomino
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox