An idle question on language design, see "Does C# have a right hand if like Perl".
For example, in recent C family languages
z = foo ( a, b, c );
a
is evaluated, then b
, then c
, so left-to-right.
z = a ? b : c;
a
is evaluated, then either b
or c
, so left-to-right order.
In Python, you write a conditional expression as
z = b if a else c
so the order is the same - a
,then b
or c
, but it's not left-to-right.
Strict left-to-right ordering was put into Java to simplify the language; ordering is implementation dependent in C or C++.