Hacker News new | ask | show | jobs
by steveklabnik 2756 days ago
“let” us a required feature of the Rust grammar; the semantics would be significantly more complex without it, making tooling harder, etc. we didn’t add it for no reason.
1 comments

Complexity often masks a lack of search for simplicity. Or was "let" the simplest answer?
It's not a matter of "search for simplicity"; the grammar is just inherently ambiguous without some sort of token in this position. let was taken from OCaml, where a lot of inspiration from Rust came from.

(As a reader, it's also really nice to be able to see "there's a new variable being created here" at a glance. Ambiguity is a human problem as well as a computer problem.)