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

deadalnix via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Thu May 29 18:15:21 PDT 2014


On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer
wrote:
>> Static if is certainly NOT an attribute, it doesn't make any 
>> sense.
>
> Well... it sorta does. static if does not introduce a new 
> scope, even with {}, and this only happens with attributes.
>
> -Steve

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.


More information about the Digitalmars-d-announce mailing list