DMD 1.017 release

Chris Miller chris at dprogramming.com
Tue Jun 26 15:26:53 PDT 2007


On Tue, 26 Jun 2007 17:49:06 -0400, Walter Bright  
<newshound1 at digitalmars.com> wrote:

> 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?
>

Yes, I was thinking about this. It would at least be pretty compatible  
with before and safer.

What about array literals? They're dynamic, but it seems like they could  
also work in init.



More information about the Digitalmars-d-announce mailing list