[Nickle]Sequencing of expressions with side effects
Bart Massey
nickle@nickle.org
Tue, 23 Jul 2002 13:28:51 -0700
In message <E17X5kf-0005dX-00@bart.cs.pdx.edu> I wrote:
> 1. The meaning of an expression should never be changed by
> explicitly putting in the parentheses implied by
> precedence and associativity.
>
> 2. Expression evaluation should honor explicit parentheses:
> parenthesized subexpressions should always be evaluated
> before their containing expressions.
The second part of number 2, is of course, bogus. What I
really mean is something more like
2. Expression evaluation should honor explicit parentheses:
parenthesized subexpressions should always be fully
evaluated (including side effects) before their value is
used.
And now that I think about it, Keith is right as well: the
question of order-of-evaluation is somewhat orthogonal to
the precedence + associativity question. Sigh. I'm
confused. Give me a bit to sort this all out.
Bart