3 ms·
Java and C# will not provide any sanity check on your use of locks and shared mutable state though. But the Rust borrow checker will. It won't prevent deadlock
by cmrdporcupine 3y ago
Java and C# will not provide any sanity check on your use of locks and shared mutable state though. But the Rust borrow checker will. It won't prevent deadlock or race conditions, but it will at least guide you there much better than those pass-by-mutable-reference OO languages will.
- vips7L 3y ago99.9% of all code written in these languages uses a thread per request model. Objects never go over a thread boundary. Using rust will only complicate these code bases for concerns that will never occur. …and if you’re concerned about mutability you can use an immutable first language like Scala or F#.
- cmrdporcupine 3y agoSure, and that's the right way to do it. But if you cross the thread boundary, it won't stop you. Rust will at least try.