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

Steven Schveighoffer via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri May 30 05:37:43 PDT 2014


On Thu, 29 May 2014 21:15:21 -0400, deadalnix <deadalnix at gmail.com> wrote:

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

Ugh, that is really bad. It shouldn't do that. Is that intentional?

-Steve


More information about the Digitalmars-d-announce mailing list