3 ms·
D just makes assert() part of the language: https://dlang.org/spec/expression.html#assert_expressions https://dlang.org/spec/expression.html#assert_expressions
by WalterBright 7mo ago
D just makes assert() part of the language:
https://dlang.org/spec/expression.html#assert_expressions https://dlang.org/spec/expression.html#assert_expressions
The behavior of it can be set with a compiler switch to one of:
1. Immediately halting via execution of a special CPU instruction
2. Aborting the program
3. Calling the assert failure function in the corresponding C runtime library
4. Throwing the AssertError exception in the D runtime library
So there's no issue with parsing it. The compiler also understands the semantics of assert(), and so things like `assert(0)` can be recognized as being the end of the program.
- rurban 7mo agoSo you are ignoring our well beloved NDEBUG? :) Our idea of declare (optimize (speed 3) (safety 0))
- WalterBright 7mo agoD compilers have a "ramming speed" setting.
- panzi 7mo agoBut does it have a ludicrous speed setting?