www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: On C/C++ undefined behaviours (on the term "undefined behaviours")

BCS:

 Some where in the spec, D defines depending on order of evaluation to be 
 invalid (placing any related bugs in your code, not the compiler, by fiat) 
 but declines to requiter the compiler to enforce it (because it can't in 
 many cases). Maybe some term for "invalid but un checked" should be used.

Walter has stated two or three times that this will probably change (and I agree with this decision), so order of evaluation will be enforced in D (as it is in Java/C#). This may reduce performance a bit in some situations, but make the semantics of D code more defined (this means it will be safer). Performance is important, but even more important is to have a language that always does what you ask it to do. Bye, bearophile
Oct 07 2010