On Fri, 07 Jun 2013 16:39:15 +0200, Tyler Jameson Little <[email protected]> wrote:

If the nogc marker could be used to overload functions then Phobos may include both versions of the code - GC and non GC - as some code may run faster under GC. The calling function would pick up the right one.

I can't imagine how this would work without over-complicating the syntax. Any ideas?

I don't understand what you mean. This is how that would work:

void foo() {}       // #1, Not @nogc.
@nogc void foo() {} // #2.

void bar() {
    foo(); // Calls #1.
}

@nogc void baz() {
    foo(); // calls #2.
}

--
Simen

Reply via email to