Re:Dave Herman’s contributions to Rust
by Thiez on Monday May 03, 2021 @06:22AM
(#27023361)
In Rust the `mut` does not apply to the `let`, but to the variable binding. So you can do this:
After this statement `x` will not be mutable, but `y` will be. You cannot do
So the way Rust currently works just doesn't map clearly on `let` and `var`.
[ Parent
| on HN ]
This is true, but the decision was made far back enough that other design decisions would have been weighed with consistency with the short behaviour in mind had that been the option chosen, and Rust would work slightly differently than how it currently works.
This is in the era of a new version having patch notes like (paraphrased) "Of the four pointer types with special syntax, we've converted two of them to regular types with names and deleted the fourth" - it predated that much concern with backwards compatibility.