On Thursday, 20 November 2014 at 16:03:41 UTC, H. S. Teoh via
Digitalmars-d wrote:
By that logic, using an int to represent an integer is also
using the
incorrect type, because a signed type is *also* subject to
module 2^^n
arithmetic -- just a different form of it where the most
negative value
wraps around to the most positive values.
The type is chosen at design time so that it's unlikely to
overflow for the particular scenario. Why would you want the
count of objects to reset at some point when counting objects?
Wrapping of unsigned integers has valid usage for e.g. hash
functions, but there they are used as bit arrays, not proper
numbers, and arithmetic operators are used for bit shuffling, not
for computing some numbers.