On Wed, Apr 10, 2013 at 3:37 PM, Chad Zawistowski <chadz....@gmail.com>wrote:

> In the case where both declarations are on the same line, I agree with the
> results of Niko's straw poll.
>
>     let mut foo = 1, bar = 2;
>
> This should make both foo and bar be mut, in my opinion.
>
> Chad
>

The question is whether mut applies to let or to foo: (let mut) foo, bar
vs. let (mut foo, bar). Is there any other place left in the language
besides let, @, and & where mut is allowed? The latter cases seem to
support (let mut): if you have &mut foo, it's a pointer through which
mutation is allowed, named foo, in other words (&mut) foo, while the other
way, &(mut foo), doesn't make any sense: it's not foo that's mutable!
Similarly for @.

So yeah, +1 for existing interpretation.


-- 
Your ship was destroyed in a monadic eruption.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to