Order of Evaluation
Henry Spencer
henry at utzoo.uucp
Sun Nov 19 10:23:26 AEST 1989
In article <21265 at usc.edu> gould at physics.usc.edu (Christopher M. Gould) writes:
> Why is the order of evaluation of subexpressions undefined?
(1) Because compilers can optimize better if they are free to rearrange
subexpressions. Often a lot better.
(2) Because [mount pulpit] you shouldn't be depending on such ugliness
anyway, so it shouldn't make a difference.
>... it would reduce the number of ambiguous statements
>legally constructed within the language. (Whether this is in itself a
>"good thing" is perhaps the real issue.)
Good programmers simply avoid the ambiguity. I can't see that it does
any harm. Attempting to legislate good programming does not work.
--
A bit of tolerance is worth a | Henry Spencer at U of Toronto Zoology
megabyte of flaming. | uunet!attcan!utzoo!henry henry at zoo.toronto.edu
More information about the Comp.std.c
mailing list