From 9114938423643918948
X-Google-Thread: f78e5,174aa7b34b06a51
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!colt.net!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: hyrosen@mail.com (Hyman Rosen)
Newsgroups: comp.std.c++
Subject: Re: Is this really unspecified behavior?
Date: Wed,  7 Dec 2005 15:52:09 GMT
Lines: 35
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <E1EjzL6-0006ic-00@chx400.switch.ch>
References: <1132629737.664847.151630@o13g2000cwo.googlegroups.com>
 <1132662585.882464.24110@f14g2000cwb.googlegroups.com>
 <E1EeZw5-0004wI-00@chx400.switch.ch>
 <XBQgf.150724$zb5.113482@bgtnsc04-news.ops.worldnet.att.net>
 <1132759176.368850.264850@g43g2000cwa.googlegroups.com>
 <H1phf.161529$zb5.99785@bgtnsc04-news.ops.worldnet.att.net>
 <1132933832.802917.153350@g14g2000cwa.googlegroups.com>
 <1133551647.532929.325730@z14g2000cwz.googlegroups.com>
 <1133583412.951239.208510@g49g2000cwa.googlegroups.com>
 <E1EjGBD-0005T8-00@chx400.switch.ch>
 <1133910546.716987.80030@g14g2000cwa.googlegroups.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1133970736 6635 158.152.254.254 (7 Dec 2005 15:52:16 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Wed, 7 Dec 2005 15:52:16 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
X-Accept-Language: en-us, en
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id jB7Fq9mG012758;
	Thu, 8 Dec 2005 02:52:09 +1100 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:2687

Bob Bell wrote:
> It's hard to regard such code as anything but broken.

That's only because of the widespread reluctance to see
the behavior of the language as the problem rather than
the behavior of the code. Why do you perceive as broken
     call( f(), g(), h() );
but not
     f(); g(); h();
It's only because long experience has ingrained into you
that in the first expression the calls are necessarily
unordered, while in the second they are ordered. But that's
just an artifact of the language, and it can be changed,
just as the Java creators decided to do.

> On the contrary, this code doesn't make me think the calls are made
> left to right, only that the output will be serialized that way. But
> then again, I understood (and got used to) the way C++ evaluates
> expressions a long time ago.

Exactly. Now go read further responses, especially the one from
ThosRTanner, and notice that he apparently does not have your
level of understanding. Which is my point. In the mathematical
sense, ignorance about sequence points and order of evaluation
is "almost everywhere". Rather than feeling proud about our level
of understanding, we should be sorry that such a level is necessary,
and endeavor to do away with it. Then we could explain the now simple
behavior to everyone, and they would all understand.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



