ambiguous ?
Jim Giles
jlg at lanl.gov
Sat Oct 21 09:02:09 AEST 1989
>From article <1989Oct20.175352.20598 at utzoo.uucp>, by henry at utzoo.uucp (Henry Spencer):
> [...]Personally, my view is that code which relies on order of evaluation
> within expressions -- except in a few well-defined cases like C's && and
> || operators -- is broken even if the language specifies a precise meaning.
Gee, isn't it interesting that the only order dependent behaviour you
are willing to trust are the "well-defined" && and || operators. Those
also happen to be the only ones (besides commas - which you presumably
also allow) that enforce order. This is another one of those "Anything
C does is right, everything else is not" arguments. Presumably, if C
made argument evaluation in function calls "well-defined", you would
would have no qualms depending on their order either. Since that has
been the point I've tried to make all along - I rest my case.
> [...] The purpose of
> a programming language is to make the algorithm executable. This always
> involves compromises.
If it involves compromises of correctness, the language is not worth
pursuing. If it involves _unnecesasary_ compromises of efficiency,
the language is in need of modification. C requires one or the other
compromise.
More information about the Comp.lang.c
mailing list