On Wed, Jan 29, 2014 at 9:52 PM, Sean McArthur <[email protected]> wrote:
> Part of the nice thing about `let mut` is that it requires you to opt-in to
> mutability, making it a conscious choice.
>
> Having `let` and `var` would make Rust be like ES6: we all look at `let` and
> say "why bother". For Rust, I imagine many would get into the habit of using
> `var` over `let` because it's easier, and as code samples show up using it,
> newcomers would default to using `var`.

Rust does give a warning when variables are unnecessarily mutable.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to