Hacker News new | ask | show | jobs
by masklinn 3490 days 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.
1 comments

I'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?

What my sibling said, but also, this almost happened. It's called "the mutapocalpyse". See here: 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.

The mut keyword on variable bindings doesn't influence uniqueness at all, though. You're probably thinking about the `&mut` references vs the `&` references.