Evaluation order

Walter Bright newshound1 at digitalmars.com
Wed Feb 24 14:31:49 PST 2010


bearophile wrote:
> Walter Bright:
>> Arbitrary, yes. Wrong? no - specifying it removes another source of
>>  potential user bugs. Left-to-right is natural because that's the
>> way we read things.
> 
> If the language accepts only pure expressions inside function calls
> then it keeps being safe, despite using the most efficient order the
> compiler finds.


All compiler behavior is based on what the observer sees. If the 
compiler can rearrange things in a manner that the observer cannot 
detect, then the rearrangement is allowed.



More information about the Digitalmars-d mailing list