Hacker News new | ask | show | jobs
by mrkeen 903 days ago
Like the sibling comment said, Rust is a special case. The ownership model is there to fight shared mutable state.

With respect to other languages, this part is interesting:

> at least not in the way I think most people would understand 'effects on a shared global state.'

You're right - most programmers do not think of it as shared global state, once it's put behind something like 'private', and exposed via getters and setters, but it is.

You can take any race condition you like, wrap the offending operations in getters and setters, and you'll still have the same race condition.