Providing implicit conversion of - memory-safety
Siarhei Siamashka
siarhei.siamashka at gmail.com
Wed Jan 24 16:07:39 UTC 2024
On Wednesday, 24 January 2024 at 09:28:57 UTC, Renato wrote:
> If you have "widespread" arithmetics which may overflow,
> something like https://dlang.org/phobos/core_checkedint.html is
> useful, yes, but in this case it's overkill.
To make use of this, one needs to already anticipate an
arithmetic overflow bug at some precise location in the code. But
this defeats the purpose. Both array bounds checks and arithmetic
overflow checks are useful when the compiler can perform these
checks globally for the whole code. To discover bugs even in the
parts of code, where they were not anticipated.
More information about the Digitalmars-d-learn
mailing list