D and expression evaluation order.

Manfred Nowak svv1999 at hotmail.com
Tue May 1 08:31:38 PDT 2007


Bruno Medeiros wrote
> All operands are evaluated left to right, with the exception of
> the assignment operators which are evaluated right-to-left.
[...]
> Any problem with this one?

Don't you see a reason why Walter has tossed himself out of this
thread?

Given an expression `a op b'
|  The expression is rewritten as both:
|    a.opfunc(b)
|    b.opfunc_r(a)

This is from the specs! Now what is the evaluation order of `a op b'?
`a' then `b'?
`b' then `a'?

If there is a cloud some people only see the silver lining.

-manfred 



More information about the Digitalmars-d mailing list