On Saturday, 19 March 2016 at 18:39:54 UTC, Jakob Ovrum wrote:
As for the `default` approach, if we designed it to work with explicit attributes, like so:
---
@safe:
void foo();
void bar(T)(T t) default @nogc; // Infer pure, nothrow and @safe but require @nogc
---
Then `default` wouldn't have that problem.

This could be OK, but it should work for bulk annotations, as well:

@safe pure @nogc nothrow {
    void foo();

    default @nogc {
        void bar();
        void baz();
    }
}

It's rather awkward, but better than what we have now.

Reply via email to