bearophile wrote:
<snip>
My little proposal for D is to turn the following into a syntax error, to avoid possile programmer mistakes (so the programmer must put parentheses here to make it compile):

x ? y : a ? b : c
<snip>

Here, right-associativity is intuitive - it's analogous to if-then-elseif. So it should probably still be allowed.

IMO if there's anywhere where parentheses should be required, it's on the confusing combinations of bitwise and relational operators.

Stewart.

Reply via email to