D and expression evaluation order.
Manfred Nowak
svv1999 at hotmail.com
Fri Apr 27 12:49:52 PDT 2007
Bruno Medeiros wrote
> Evaluate operands in the same order as the associativity rule
> of the
> operator.
You require all operators to have an associativity? Then what is the
associativity of the operators for comparison?
> So stuff like this:
> c = a + (b = c);
> evaluates in this order:
Seems arbitrary choosen to me.
> A function call, since it is basicly an operator that takes a
> function value and arguments as operands, works in the same rule.
I see now, that you want a defined order for all expressions.
Then imagine an arbitrary sequence of assignments: are you able to
identify the regions of that sequence that are in existence only
because the coder wants to use an ordering other then the predefined?
If you are able to do so
and someone declares that he is not able to do so
then how would you teach him that capability of yours?
Please start immediately under the fiction, that I am not able to
identify those regions.
-manfred
More information about the Digitalmars-d
mailing list