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

jthill@netcom.com (Jim Hill)
Thu, 3 Aug 1995 09:12:26 GMT

          From comp.compilers

Related articles
[7 earlier articles]
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)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-08-07)
Re: Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-08-08)
Re: Order of argument evaluation in C++, etc. graham.matthews@pell.anu.edu.au (1995-08-08)
Re: Order of argument evaluation in C++, etc. det@sw.stratus.com (David Toland) (1995-08-08)
Re: Order of argument evaluation in C++, etc. jthill@netcom.com (1995-08-10)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-08-11)
[29 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: jthill@netcom.com (Jim Hill)
Keywords: design, optimize
Organization: biological <-- hey! a one-word oxymoron!
References: 95-07-068 95-08-017
Date: Thu, 3 Aug 1995 09:12:26 GMT



jhallen@world.std.com (Joseph H Allen) writes:


> foo(`x=7,`y=8) and foo(`y=8,`x=7) are equivalent.


> So do you evaluate them in order of appearance or in the order they are
> pushed on the stack (which probably depends on how the function was
> defined)?


chase@centerline.com (David Chase) wrote:
>Obviously, you evaluate them in the order of appearance. That
>will be most intuitive to the programmer, and should the programmer
>actually need this level of control, they have it.


I'd say leave it unspecified. If a programmer needs that level of control
they can just write them as separate statements in sequence. I'll go out
on a limb and assert that 99+% of all argument lists are completely
unaffected by order-of-evaluation, and that the ordering would be better
reserved for implicit doc.


I actually liked and used all of the old PL/I argument-list syntax
flexibility, though, and maybe that counts as a crank-poster warning these
days... :-)


Jim
--
Jim Hill Contents public domain and worth $.02 more than you paid.
jthill@netcom.com PGPrint: 6B 85 76 D1 EF BA 2C 78 12 25 8A 5A BF F3 37 7E
--


Post a followup to this message

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