On Sunday, 29 March 2015 at 17:02:54 UTC, D. Martinez wrote:
2. The function attributes: @nogc nothrow. These relate to my
realtime audio thread because I want neither of these things to
occur; my thread runs unmanaged by the D runtime and I
appreciate the static checking. But I don't use it: why?
I use writefln a lot to debug my implementations, which is
incompatible with either assumption. I wish it were possible to
bypass @nogc nothrow in debug mode, only to emit a warning. To
change dozens of functions to set @nogc on/off depending on
usage context is not practical. I hope D can provide a better
solution, than systematic use of sed scripts. :)
Hmm, this sounds like it might be a bug or design flaw. "debug"
is supposed to provide an escape hatch from even pure functions:
I don't see why it wouldn't provide the same for @nogc and
nothrow. At the very least, we should have a @nogc/nothrow
alternative to writefln to allow such simple debugging.