I'm only reporting what is common in mathematical texts
that discuss what used to be called "whole numbers" (and
which the ISO document now calls "natural numbers"). I
wasn't making any claim about which usage is "right",
only explaining my own usage.
>> Third, the comment about having to write a wrapper applies just
>> as much to signed integer types, if not moreso. The set of
>> natural numbers is infinitely large, which is not even close to
>> being true for either signed integer types or unsigned integer
>> types.
>
> I suspect that we do not need larger integer numbers than for
> example billion more often than we need to find out distance
> between two numbers ... but don't have such statistics.
>
>> But probably most important is that operations on unsigned types
>> always at least produce some number, which IMO makes them more
>> natural than the undefined behavior that happens with signed
>> types.
The domain of the natural numbers is infinite. The domains
of all standard integer types are bounded, not infinite.
Also, the domain of natural numbers does not include any
negative numbers. It seems odd to say that a signed
integer type, which does include negative numbers, is
more like the natural numbers than an unsigned integer
type, which does not include negative numbers.
> That "undefined behavior" is likely a result of sabotage.
I'm at a loss to understand what you mean here. The people
who wrote the original ANSI/ISO C standard surely were not
intending to cripple the behavior of arithmetic operations
for signed integer types. Presumably the behavior was left
undefined as a reflection of a wide variety of different
possible hardware platforms, both existing at the time and
plausibly existing in the foreseeable future.
> Actual
> hardware platforms that support signed arithmetic behave on case
> of signed integer overflow in definable manner and even the
> differences between behavior of different platforms could be
> indicated with a value of pre-defined macro or the like.
Sure, such a thing could be done, but that's not part of the
language. And as far as that goes, if what is wanted is
reliable operations for signed quantities, the easiest way
to do that is very likely to represent the signed quantities
with unsigned integer types.