-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion for chapter about bindings #28177
Comments
Just a note. Comparing to Rust By Example section about bindings, shadowing and declaring uninitialized bindings have been left out. |
JanLikar
added a commit
to JanLikar/rust
that referenced
this issue
Sep 30, 2015
- Expand the first paragraph - Improve readability by partitioning the chapter into the following sections: "Patterns", "Type annotations", "Mutability", and "Initializing bindings" - Add "Scope and shadowing" section (fix rust-lang#28177)
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Sep 30, 2015
- Expand the first paragraph - Improve readability by partitioning the chapter into the following sections: "Patterns", "Type annotations", "Mutability", and "Initializing bindings" - Add "Scope and shadowing" section (fix rust-lang#28177) r? @steveklabnik
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Sep 30, 2015
- Expand the first paragraph - Improve readability by partitioning the chapter into the following sections: "Patterns", "Type annotations", "Mutability", and "Initializing bindings" - Add "Scope and shadowing" section (fix rust-lang#28177) r? @steveklabnik
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I feel variable bindings need to be explained more.
Working and learning alone, it took me quite some time to figure them out
(hopefuly I got everything right). Things like:
It has to be used ONLY when you want to introduce a new binding:
last will "win" (or shadow) over the previous one
even if it has the same name as one before
These things are simply not stressed enough in the book (or not mentioned at all) and understanding these things is the basis for understanding something like this:
The text was updated successfully, but these errors were encountered: