Am 18.02.2013 18:49, schrieb JoeCoder:
1. A @nogc attribute. This would work similarly to pure/safe/nothrow and would check at compile time that annotated functions or any they call allocate any memory enforced by the GC. Then phobos would no longer be a "landmine" for those with realtime requirements.
I really would love to have that too. The problem with this still would be exceptions because D throws by reference and not by value like C++. To make this work there would be the need to add a special Exception allocator and make the compiler emit delete calls in case the exception is caught and not rethrown or something similar.
Kind Regards Benjamin Thaut