> adding two large integers can result in an integer that cannot be represented in the integer type. We often refer to such error conditions as overflows. There's a subtlety here that's missed in the article: In C and C++ this is only called "overflow" for signed integers. That's because that word specifically refers to the case where the behaviour is undefined, and for unsigned integers the result is always well def…
We probably need different integer types to express the differences. Perhaps whether or not we check for overflow can be encoded in the type of the integer.
The exact opposite of the scripting language "everything is just a thing and you can add numbers to strings or whatever idk".
Saturation arithmetic is useful in e.g. audio codecs as it corresponds to "clipping"; there's hardware support for it in some SIMD instruction sets and I think it's required for some compression standards. But compilers won't generate it because there's no way to easily represent it in most languages other than hope for pattern-matching in the optimizer.
Would also be a good place for "please compile this function with constant execution time regardless of inputs and fail if you can't do that", useful for crypto.