News for hackers. Stuff that matters.
Re:Explore the ownership system in Rust by dan00 on Tuesday January 20, 2015 @06:21AM (#8916426)
> Haven't yet written any Rust code, but aren't those two things contradicting each other?

I don't think so.

One way to ensure that data isn't mutated by different parts of a program, is to have immutable data structures.

The other way - the Rust way - is to seriously track who holds mutable references to the same data and just not allow it.

So you can have more optimized mutable data structures, but can be sure, that if you're holding a mutable reference, that no other can modify the data during the lifetime/scope of your mutable reference.

There are no comments on this comment yet.