4 ms·
> I would be generous in agreeing with a statement about Rust making it a little more difficult to end up with a deadlock or unwanted race condition, except tha
by pcwalton 8y ago
> I would be generous in agreeing with a statement about Rust making it a little more difficult to end up with a deadlock or unwanted race condition, except that's not true when compared with many other high level languages.
It is easy to specifically describe what Rust prevents: unsynchronized memory access from multiple threads. What other high-level languages allow read-write shared-memory multithreading and guarantee that?
> Also nothing is impossible until you prove it via formal methods (e.g. TLA+).
The fact that unsynchronized memory access is impossible in safe Rust (modulo compiler bugs, CPU bugs, etc.) is something that nobody seriously doubts. It's obvious. I'm glad people are working on proving it, but the proof is an academic exercise.
- Svenskunganka 8y ago> It is easy to specifically describe what Rust prevents: unsynchronized memory access from multiple threads. What other high-level languages allow read-write shared-memory multithreading and guarantee that? Pony maybe? https://www.ponylang.org/discover/#what-is-pony https://www.ponylang.org/discover/#what-is-pony At least that's my impression of its reference capabilities.
- dbaupp 8y agoNo, it's something that Pony relatively explicitly doesn't allow: AIUI, iso (non-aliasable, read/write), val (aliasable, read-only, no write) and tag (aliasable, no read or write) are the only things that can be shared between actors/threads.