Description
Section 11.1 on for loops unusually begins by showing C syntax, saying "Rust's for loop doesn't look like this C for loop:"
In my opinion that is a strange way to introduce Rust's for loops.
Furthermore the C code is not clearly indicated to be in another language, so someone casually perusing the documentation may not notice that it is from another language.
Lastly, the C code has a link to the rust play pen, which obviously results in a syntax error if you try to run it:
:2:12: 2:13 error: expected ,
, found =
:2 for (x = 0; x < 10; x++) {
I think it would be better to introduce Rust's notation first, and then perhaps make a passing remark that this is different to some languages (such as C) - though it is also similar to other languages, such as Python.
Activity