Came across this Hacker News comment by @rain which succinctly describes one reason #Rust's approach to ownership and borrowing is valuable: https://news.ycombinator.com/item?id=39831978
> Which popular GC languages have mutexes owning the state they guard, such that it is structurally impossible to access that inner state without holding the lock? To do that you must have single ownership.
Posting for the benefit of anyone else who, like me, is sometimes swayed by the backlash against Rust.
Comments
Displaying 0 of 1 comments
samir, hibernating
@matt @rain Yes, 100% agreed! I was writing some C# recently and found myself missing “shared XOR mutable” so much. Even when you have a garbage collector, thread safety is so hard, and Rust’s ownership model removes a whole class of potential bugs.
I often miss my garbage collector but I’d have a hard time giving up Rust for concurrent programming at this point.
Likes: 0
Replies: 0
Boosts: 0