|
|
|
|
|
by archargelod
570 days ago
|
|
Nim has this too: - `assert` is disabled in unsafe `danger` mode or can be disabled with a flag for performance
- `doAssert` cannot be disabled
While I've never come across an argument for why there are two types of assert, over time I’ve naturally started using them in the same way as the author. |
|
Note that Rust got this exactly right. assert, debug_assert. Clear and fail-safe.