Related articles |
---|
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++, et shepherd@schubert.sbi.com (1995-08-08) |
Re: Order of argument evaluation in C++, et macrakis@osf.org (1995-08-10) |
Re: Order of argument evaluation in C++, etc. eggert@twinsun.com (1995-08-13) |
Re: Order of argument evaluation in C++, et rfg@rahul.net (Ronald F. Guilmette) (1995-08-14) |
Newsgroups: | comp.compilers |
From: | shepherd@schubert.sbi.com (Marc Shepherd) |
Keywords: | C++, optimize |
Organization: | Compilers Central |
References: | 95-08-034 |
Date: | Tue, 8 Aug 1995 17:07:02 GMT |
Dave Lloyd <dave@occl-cam.demon.co.uk> () writes:
>This old chestnut keeps cropping up again and again with every new
>language and then reiterated for all the existing languages.
>
>This has been resolved properly many times and promptly ignored by
>the next language committee. Algol 68 did a very good job with
>collateral and serial evaluation which leads to no surprises once the
>easy fact that left precedence does not imply left ordering is
>accepted.....
[snip]
Dave Lloyd ignores the fact that C++ already had a huge body of existing
practice well before any "committee" ever dealt with it. And C++, of course,
was designed to be compatible (insofaras possible) with C, which was designed
to be compatible with B, which was designed to be compatible with BCPL, which
predates Algol 68.
I wouldn't be so fast to accuse the committee of "ignoring" anything.
It is not in their charter to wipe the slate clean and redesign the
language the way it would have been if we were starting from scratch
today. (If it were, then "order of evaluation" would be merely one
of many historical warts that would be candidates for redesign, and
you'd end up with a brand new language, which might be extremely
interesting, but would have nothing to do with C++.)
David Petrie Stoutamire writes:
>Well, *I'd* be happier if the execution order was nailed down somehow.
>It doesn't matter how fast the code is that your compiler generates, if
>no-one understands the language intricacies well enough to write code
>that'll actually work.
Even if order of evaluation were guaranteed, I submit that any
program that relies on it is far too subtle to be safely maintained.
---
Marc Shepherd
Salomon Brothers Inc
shepherd@schubert.sbi.com
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.