DIP60: @nogc attribute
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 15 13:46:38 PDT 2014
On 4/15/2014 1:42 PM, Frustrated wrote:
> I do not think new is exclusive to GC? It can be overridden.
Global operator new is not overridable.
> If new is overridden by classes and marked @nogc then it too should be allowed.
Then they are treated as regular functions - they'd have to be marked as @nogc
to be used in @nogc functions.
> e.g., new, slices, array behavior, even all the GC methods themselves, are all
> not necessarily dependent on the GC if their behavior can be overridden not to
> use the GC.
Overrides use functions, and then the behavior depends on how those functions
are annotated.
> I just hope that if implemented, it is not blindly done so that prevents one
> from accurately removing GC dependence(which is the whole point of having the
> attribute).
I don't know what you mean by this.
More information about the Digitalmars-d
mailing list