It's unfortunate that the world standardized on integer overflow not giving an error. That should have been the default behavior, with programmers having to explicitly choose wrapping without overflow when that was desired.
Of course, that would also have required explicit signed and unsigned arithmetic operations, because overflow (and underflow) differ for signed vs. unsigned.
Now the no-overflow-error behavior is entrenched in C and C++.
CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.