rust-lang / book

The Rust Programming Language

Home Page:https://doc.rust-lang.org/book/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Order of constants for THREE_HOURS_IN_SECONDS

rillig opened this issue · comments

  • I have searched open and closed issues and pull requests for duplicates, using these search terms:
    • THREE_HOURS_IN_SECONDS
    • 60
  • I have checked the latest main branch to see if this has already been fixed, in this file:
    • src/ch03-01-variables-and-mutability.md

Description of the problem:
I'm learning Rust using the book, and it's been a very pleasant experience so far. When I saw the expression 60 * 60 * 3, I wondered why you wrote the numbers in this order, as I'm more used to seeing them in the order 3 * 60 * 60, which resembles how a period of 3 hours is displayed on a digital clock.

Suggested fix:

  • Replace 60 * 60 * 3 with 3 * 60 * 60
  • Adjust the description below that number, as the current wording relies on the reading order.

I would vote for 3 * 60 * 60 as well, but when we care for all these details, the book would get thousands of tiny fixes. For me the book is just good enough as an introduction to Rust, so I stopped suggesting more fixes for now. Note that the authors have rejected already more serious issues like the misleading term "compiler error" instead of the correct term compilation error or compile error, see https://users.rust-lang.org/t/funny-beginner-bug/105057/2?u=stefansalewski

Yes, I don't think this is significant.