From -4931552952750486454
X-Google-Thread: f78e5,52112cea9d2ccd4a
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news1.google.com!news.maxwell.syr.edu!wns13feed!worldnet.att.net!207.14.113.17!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: Marc Schoolderman <squell@alumina.nl>
Newsgroups: comp.std.c++
Subject: Re: =?ISO-8859-1?Q?=A75=2E2=2E2/8_unspecified_evluation_od?=
 =?ISO-8859-1?Q?er=3F?=
Date: 30 Jul 2005 20:50:02 GMT
Organization: Tiscali bv
Lines: 35
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <42ebdf3e$0$746$5fc3050@dreader2.news.tiscali.nl>
References: <CsidnX1xcd4C73_fRVn-tA@speakeasy.net>   <42E4EB01.9020700@alumina.nl>   <42E64CCE.7030708@cs.york.ac.uk>   <42E68BDD.1050701@alumina.nl> <1122649512.879866.38000@g44g2000cwa.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.6) Gecko/20050319
X-Accept-Language: en-us, en
NNTP-Posting-Date: 30 Jul 2005 22:12:46 CEST
X-Trace: 1122754366 dreader2.news.tiscali.nl 746 195.241.9.222:39528
X-Complaints-To: abuse@tiscali.nl
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Xref: g2news1.google.com comp.std.c++:1574

Martin Bonner wrote:

>>is perfectly okay. If obj.f() would modify the observable state of the
>>object, this would either be caught at compiletime, or be indicative of
>>problems in the class that will probably crop up elsewhere too.
> Unless foo::f is defined as:
<snip>

I don't think a member function should be 'const' solely because it
doesn't touch immutable non-static members.

> or realistically, if f does not alter the object it is called on,
> but DOES alter something in the wider world.

I can only imagine this for function objects. But then you can still 
distinguish 'function-objects' and 'procedure-objects'.

In any case, I believe expressions should be agnostic to evaluation 
order, or they will be harder to understand, change, and prove correct. 
Functional programming languages try to teach this as well.

In extreme contrast, I read that C# has its evaluation order dependent
on operator precedence. If any one cares for that, just glance at this
discussion on MSDN; compare the C++ answer.

http://blogs.msdn.com/ericgu/archive/2004/04/19/116265.aspx

~Marc.

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



