DIP60: @nogc attribute

Gary Willoughby via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 16 10:22:01 PDT 2014


On Tuesday, 15 April 2014 at 21:41:37 UTC, Brad Anderson wrote:
> Yes, please. Too few of the attributes have inverse attributes.
>
> Being able to stick your defaults up at the top of your module 
> and then overriding them only when needed would be very nice 
> and make the code a lot more tidy.

I actually think this will make code harder to read. e.g.:

@nogc:

void foo()
{
    ...
}

void bar() @gc
{
    ...
}

@gc
{
    void baz() @nogc
    {
       ...
    }
}

@gc:

void quxx() @nogc
{
    ...
}

Ewww... nasty stuff.


More information about the Digitalmars-d mailing list