URL: https://rust-book.cs.brown.edu/ch03-02-data-types.html#scalar-types
Issue: Imprecise definition of unsigned integers (Chapter 3.2)
Current wording ():
In the section introducing integer types, the book says:
"or whether it will only ever be positive and can therefore be represented without a sign (unsigned)."
Problem:
Mathematically, zero is neither positive nor negative. Unsigned integers can represent zero and positive numbers (i.e., non-negative numbers, >= 0), not just "positive" numbers. Using "positive" here is mathematically incorrect and may confuse learners.
Suggested fix:
Change the phrasing to:
"Or it's always non-negative (that is, zero or positive), so it doesn't need a sign (unsigned)"
URL: https://rust-book.cs.brown.edu/ch03-02-data-types.html#scalar-types
Issue: Imprecise definition of unsigned integers (Chapter 3.2)
Current wording ():
In the section introducing integer types, the book says:
"or whether it will only ever be positive and can therefore be represented without a sign (unsigned)."
Problem:
Mathematically, zero is neither positive nor negative. Unsigned integers can represent zero and positive numbers (i.e., non-negative numbers, >= 0), not just "positive" numbers. Using "positive" here is mathematically incorrect and may confuse learners.
Suggested fix:
Change the phrasing to:
"Or it's always non-negative (that is, zero or positive), so it doesn't need a sign (unsigned)"