Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"

Timon Gehr via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sat May 31 15:56:17 PDT 2014


On 05/30/2014 02:37 PM, Steven Schveighoffer wrote:
>>>
>>
>> in which case
>>
>> static if(cond) {
>> immutable:
>> }
>>
>> int x;
>>
>> should not create x as immutable if cond is true. The current
>> behavior is not consistent with attribute either.
>
> Ugh, that is really bad. It shouldn't do that. Is that intentional?

enum cond=true;

static if(cond){
immutable:
}

int x;
static assert(is(typeof(x)==int));

What is the problem?


More information about the Digitalmars-d-announce mailing list