Order of evaluation vs. sequence points

bearophile bearophileHUGS at lycos.com
Mon Aug 8 08:06:36 PDT 2011


Jens Mueller:

> Why did D choose to follow C/C++'s defined sequence points?

I think to simplify the implementation, because I think it comes from the evolution (the back-end too) of a C++ compiler.
But Walter has said two or three times that he's interested in changing D semantics, and define the order of evaluation in both function calls and in expressions.
The little (but how much? I have never seen realistic benchmarks on this) decrease in performance is in my opinion worth the gain in code determinism, across compilers too.

Bye,
bearophile


More information about the Digitalmars-d mailing list