I suggest adding a way to override a @nogc function for debugging purposes:
suppose we need to *temporarily* debug / instrument a function marked as @nogc (myfun) by adding some piece of code that may allocate (quick and dirty debugging). Unfortunately, in DIP60 we can't just temporarily remove the @nogc attribute as myfun may be called by many other @nogc functions and changing all those attributes would be too complex. With the propose override, we can just recompile with a flag ; how to do that is implementation detail but here's an option: dmd -allow_gc_in_nogc fun.d @nogc myfun(){ //temporary for debugging/instrumentation @gc{ //code that can allocate } } On Tue, Apr 15, 2014 at 10:01 AM, Walter Bright via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > http://wiki.dlang.org/DIP60 > > Start on implementation: > > https://github.com/D-Programming-Language/dmd/pull/3455 >