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++.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.