From -3401976977296714583
X-Google-Thread: f78e5,174aa7b34b06a51
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: bop@gmb.dk ("Bo Persson")
Newsgroups: comp.std.c++
Subject: Re: Is this really unspecified behavior?
Date: Fri,  9 Dec 2005 04:54:02 GMT
Lines: 54
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <3vrcrnF17e3buU1@individual.net>
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> <3vlsa2F16leqsU1@individual.net> <43982d20$0$28446$9a6e19ea@news.newshosting.com>
NNTP-Posting-Host: news.news.demon.net
X-Trace: news.demon.co.uk 1134104047 11873 158.152.254.254 (9 Dec 2005 04:54:07 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Fri, 9 Dec 2005 04:54:07 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-Priority: 3
X-Orig-X-Trace: individual.net Wwky6Sz3UANfCzXSsL//3wQsMx6t72pWgCDoooQsENLkJlk4k6
X-RFC2646: Format=Flowed; Response
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-MSMail-Priority: Normal
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id jB94s2Qs021902;
	Fri, 9 Dec 2005 15:54:02 +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-Newsreader: Microsoft Outlook Express 6.00.2900.2670
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:2713


"Ron Natalie" <ron@spamcop.net> skrev i meddelandet 
news:43982d20$0$28446$9a6e19ea@news.newshosting.com...
> Bo Persson wrote:
> n any order.
>>
>> If the functions really affect each other, this is *really* bad 
>> code. Why don't we require a diagnostic
>>
>> Warning: Terrible code - please rewrite!
>
> I suppose the above is sarcasm,

It sure is.

> but it's generally not possible to
> tell that the functions have untoward effect.
>
> All it takes is a write to the same ultimate output channel (which
> may be unrelated C++ streams) to cause variability in observed 
> behavior.
>

Yes, but should we encourage that kind of coding, by defining its 
meaning? I have never felt that I need to write code like

i = f(i++, i++);

so I don't think it is very productive to spend time specifying 
exactly what it means.

In both C and C++ we already have ways of specifying a particular 
evaluation order when needed. We just write the expressions in the 
particular order, and put a semicolon between each. That's it!

I don't belive there is any advantage in supporting function calls 
containing large expressions, with multiple interdependent side 
effects. In my opinion this would encourage writing hard to understand 
code, rather than good and readable code.


I would rather see compiler writers spend their time on implementing 
what is already in the standard. That would be more useful to me.


Bo Persson


---
[ 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                       ]



