How do I specify a non-negative number at the type level, if I shouldn't be using unsigned?
问题 In a Going Native 2013 talk, the panel had suggested avoiding unsigned integer types when specifying variables that "can't be negative". 12:15: "Use signed integers unless you need 2's compliment arithmetic or a bit pattern." 12:55: "Use ints until you have a reason not to. Don't use unsigned unless you are fiddling with bit patterns, and never mix signed and unsigned." 42:45: "Whenever you mix signed and unsigned numbers you get trouble. The rules are just very surprising, and they turn up