←back to thread

193 points ingve | 1 comments | | HN request time: 0.216s | source
Show context
ilrwbwrkhv ◴[] No.43712785[source]
Rust has a bunch of these while being maintainable.
replies(4): >>43713075 #>>43714151 #>>43714332 #>>43724210 #
mrkeen ◴[] No.43714151[source]
STM is Haskell's feature for safe shared&mutable state.

What is Rust's feature for safe shared&mutable state?

replies(2): >>43715359 #>>43715749 #
1. zozbot234 ◴[] No.43715749[source]
Relevant: https://github.com/Marthog/rust-stm which has usage instructions. It's memory safe as defined in Safe Rust, but unlike the Haskell implementation it's not "safe" in a correctness sense, because Rust does not afford the same control about mutability and purity. (At least, not yet - future additions to the language may improve this somewhat.)