DMD 1.017 release

Walter Bright newshound1 at digitalmars.com
Tue Jun 26 14:49:06 PDT 2007


Chris Nicholson-Sauls wrote:
> Valid logic, but what about the common case of 'int f = 42;'?  Maybe the 
> rule should be that .init is either a /literal/ initializer's value, or 
> a CTF initializer's value, or else the type's .init value.  (I can 
> recall having once or twice relied on a variable's .init being something 
> particular.)

How about, if it isn't a compile time constant, then using .init is an 
error?

I think that if CTFE fails, having it silently revert to the type.init, 
would be frustratingly obscure behavior.



More information about the Digitalmars-d-announce mailing list