Why is D unpopular?
forkit
forkit at gmail.com
Sun May 22 11:49:27 UTC 2022
On Friday, 20 May 2022 at 06:40:30 UTC, Tejas wrote:
>
>
> Isn't the advice to use `enforce` for handling/verifying input
> in release builds and `assert` for development builds though?
> Yeah, it's violating DRY if a particular check needs to be done
> in both development and release, but then one can skip the
> `assert` and just do `enforce`, no?
argh!
I often forget that D removes assert in release mode :-(
If only we had Rust style asserts.
And by that, I specifically mean:
"Assertions are always checked in both debug and release builds,
and cannot be disabled. See debug_assert! for assertions that are
not enabled in release builds by default."
https://doc.rust-lang.org/std/macro.assert.html
More information about the Digitalmars-d
mailing list