Re: Order of argument evaluation in C++, etc.

hbaker@netcom.com (Henry Baker)
Wed, 26 Jul 1995 02:41:11 GMT

          From comp.compilers

Related articles
Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-07-08)
Re: Order of argument evaluation in C++, etc. wclodius@lanl.gov (WIlliam B. Clodius) (1995-07-10)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-07-12)
Re: Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-07-18)
Re: Order of argument evaluation in C++, etc. stefan.monnier@epfl.ch (Stefan Monnier) (1995-07-20)
Re: Order of argument evaluation in C++, etc. dmk@dmk.com (1995-07-21)
Re: Order of argument evaluation in C++, etc. jhallen@world.std.com (1995-07-21)
Re: Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-07-26)
Re: Order of argument evaluation in C++, etc. karlcz@moraine.hip.berkeley.edu (1995-07-26)
Re: Order of argument evaluation in C++, etc. Steve_Kilbane@cegelecproj.co.uk (1995-07-26)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-07-28)
Re: Order of argument evaluation in C++, etc. davids@ICSI.Berkeley.EDU (1995-07-30)
Re: Order of argument evaluation in C++, etc. dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-07-31)
Re: Order of argument evaluation in C++, etc. jthill@netcom.com (1995-08-03)
[35 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: hbaker@netcom.com (Henry Baker)
Keywords: C++, optimize
Organization: nil
References: 95-07-068 95-07-132
Date: Wed, 26 Jul 1995 02:41:11 GMT

Stefan Monnier <stefan.monnier@epfl.ch> wrote:


> Henry Baker <hbaker@netcom.com> wrote:
> ] My personal feeling is that I agree (in this instance) with David Chase
> ] 100%, and would go so far as to say that far from allowing _speedups_, the
> ] current ambiguity in the language standards actually _guarantees_
slowdowns in
> ] programs which aspire to any amount of portability. The problem is
that if you
> ] were truly paranoid, you would have to start locking and unlocking serially
> ] accessed data structures on the different arguments to a multi-argument
> ] procedure.
>
> What's wrong with using
> tmp1=argexp1;
> tmp2=argexp2;
> ...
> fun(tmp1, tmp2, ...)
>
> instead of
> fun(argexp1, argexp2, ..)
>
> The code is less readbale, but definitely not slower.
>
> Stefan
> [I thought compilers were supposed to make programming easier, not harder.
> -John]


I think that Stefan forgot his smiley...


I rather like programming in continuation-passing style :-) -- it completely
eliminates all order-of-evaluation problems because there's only one
possible function can that can be done at any given time, so the compiler
can't screw up. You can even do it in C, and it's actually quite efficient--


ftp://ftp.netcom.com/pub/hb/hbaker/CheneyMTA.html (also .ps.Z)


--
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.