>Even basic arithmetic operations, e.g. the average of two integers, is unreasonably hard with signed arithmetic.
What do you have in mind? I understand that the addition can overflow, but that can happen with unsigned as well.
What do you have in mind? I understand that the addition can overflow, but that can happen with unsigned as well.
The pitfalls of signed arithmetic are much more insidious. Left shift a negative value? UB. Negate a negative value: maybe it's still negative. INT_MIN / -1? Crash!
Even basic arithmetic operations, e.g. the average of two integers, is unreasonably hard with signed arithmetic.