| ▲ | WalterBright an hour ago | |
D has a keyword prefix `debug`. So, one can write things like:
So, you can throw the -debug switch on the compiler and the debug code is enabled. For asserts,
and the check is only run when the -debug switch is done. It works remarkably well.Another interesting property of `debug` is it turns off the safety checks in the target statement that follows it. Because, sometimes you just gotta do some unsafe tricks to figure out where your code went wrong. | ||