File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -165,12 +165,13 @@ particularly easy to read.
165
165
166
166
## Why is ` let ` used to introduce variables?
167
167
168
- We don't use the term "variable", instead, we use "variable bindings". The
169
- simplest way for binding is the ` let ` syntax, other ways including ` if let ` ,
170
- ` while let ` and ` match ` . Bindings also exist in function arguments positions.
168
+ Instead of the term "variable", we use "variable bindings". The
169
+ simplest way for creating a binding is by using the ` let ` syntax.
170
+ Other ways include ` if let ` , ` while let ` , and ` match ` . Bindings also
171
+ exist in function argument positions.
171
172
172
173
Bindings always happen in pattern matching positions, and it's also Rust's way
173
- to declare mutability. One can also redeclare mutability of a binding in
174
+ to declare mutability. One can also re-declare mutability of a binding in
174
175
pattern matching. This is useful to avoid unnecessary ` mut ` annotations. An
175
176
interesting historical note is that Rust comes, syntactically, most closely
176
177
from ML, which also uses ` let ` to introduce bindings.
You can’t perform that action at this time.
0 commit comments