On Tuesday, 19 February 2013 at 07:19:06 UTC, Sergei Nosov wrote:
Then I guess you would rather use C++ than D. =) It's more of "idiomatic" subject than anything else. One of the ways C++ and D differs is the answer to the question "what should happen if you do something *fancy*?".

The C++ answer is "the program should crash (go to the undefined behavior area)". And the D answer is "the program should sacrifice performance/memory, but remain in a well-defined state and *do the right thing*".

This is unreasonable. D targets itself as a system programming language, among the others usage cases, and thus request to have a compiler-enforced memory usage guard is perfectly valid. What shall it do if something "fancy" is attempted in @nogc? Issue a compile-time error, profit!

Reply via email to