Published by Matt Campbell

published

Matt Campbell's Post

Came across this Hacker News comment by @rain which succinctly describes one reason 's approach to ownership and borrowing is valuable: news.ycombinator.com/item?id=3

> 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.


Likes: 0
Boosts: 0
Hashtags: #rust
Mentions:

Comments

Displaying 0 of 1 comments

samir, hibernating

In response to this post

@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