3 ms·
That's really interesting in that the Rust developers ended up falling on the side of "no". Immutability is contextual (depending on the type of reference you h
by masklinn 10y ago
That's really interesting in that the Rust developers ended up falling on the side of "no". Immutability is contextual (depending on the type of reference you hold) and purity annotations ended up being completely removed.
- continuational 10y agoI'm wondering why the `mut` keyword is named the way it is when you can still have "interior" mutability regardless of whether you have a `mut` reference or not. Shouldn't it be called `unique` instead?
- FreeFull 10y agoThe mut keyword on variable bindings doesn't influence uniqueness at all, though. You're probably thinking about the `&mut` references vs the `&` references.
- steveklabnik 10y agoWhat my sibling said, but also, this almost happened. It's called "the mutapocalpyse". See here: http://smallcultfollowing.com/babysteps/blog/2014/05/13/focusing-on-ownership/ http://smallcultfollowing.com/babysteps/blog/2014/05/13/focu... In the end, we decided that these are two equivalent perspectives, and decided to stick with the more traditional mutable/immutable distinction.