Some people used to use unsigned integers as 'mere' non-negative numbers, but 
they're actually not numbers from range, they're numbers from entirely 
different algebra. And - yes - this causes subtle bugs. Recent introduction of 
integer range promotions works hard in hiding those bugs, so they manifest only 
in very rare corner cases.

Ever wondered wheter a-=b and a+=-b equivalent? In most cases they are, except 
for one. Do you remember? uint is not propagated to long. I've hit it recently. 
It's exactly because unsigneds are not just non-negative numbers. So it's pain 
to see their wide use as numbers for which sign-sensitive arithmetic operations 
are meaningful.

Reply via email to