|
|
|
|
|
by IshKebab
570 days ago
|
|
How are people still making the classic `foo`/`foo_safe_version` mistake? In a supposedly modern language. And they didn't even name the safe version clearly! If the rest of Nim is designed on this level then I hope it never succeeds. Note that Rust got this exactly right. assert, debug_assert. Clear and fail-safe. |
|
They are both enabled in release AND debug modes. You would have to explicitly compile code with -d:danger flag to disable any assertions.
> And they didn't even name the safe version clearly!
In this context safe version is clearly named as "release" mode, and unsafe one is even more clear - "danger" mode. "danger" obviously implies it should be used with caution.