On Mon, Jul 12, 2010 at 7:07 AM, David Golden <xdaveg@gmail.com> wrote: > I said "... have side effects when evaluated ..." but your example has > a side effect (functional call) in an assignment before the logic > expression. I realise you knew it would break. What I was pointing out is that it breaks a common idiom. "or" and "and" are used for flow control all over in my code. You're suggesting we can no longer count on the argument evaluation order of logical operators. It has long been documented that "the right expression is evaluated only if the left expression is false.", but your suggestion is to evaluate the RHS first if it's constant. It would change the function of a fundemental operator.Thread Previous | Thread Next