lujnan <> writes:
>> I don't want diagnostics; I want strict left to right evaluation order
>> of operands and subexpressions that complete their side effects before
>> yielding a value.
>
> i agree with your point of view.
Then you don't want C.
There are valid reasons for the way C leaves some expression evaluations
undefined. It gives compilers freedom to perform certain optimizations,
which makes for faster code. And code whose behavior is undefined tends
to be unclear, and would better be written in a different way whose
behavior is well defined.
Even in a language that defines its behavior, "a = a++" is bad code.
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"