Evaluation order of index expressions
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 25 13:02:14 PDT 2015
"Timon Gehr" wrote in message news:mjvtqm$17d8$1 at digitalmars.com...
> A related issue is that the rewrites documented at
> http://dlang.org/operatoroverloading.html don't all preserve the order of
> subexpressions. However, ideally, the order of evaluation would be
> preserved.
As operator overloading is defined in terms of lowering to function calls, I
think it's reasonable to decide the order of evaluation after the lowering.
This will still be consistent across compilers and platforms. Preserving
the original order would require added complexity that I don't think is
warranted.
More information about the Digitalmars-d
mailing list