3 ms·
I'd say concurrency support is a big one: Rust rules out data races at compile time, eliminating the need for race detectors, while ensuring that you still have
by pcwalton 13y ago
I'd say concurrency support is a big one: Rust rules out data races at compile time, eliminating the need for race detectors, while ensuring that you still have the full array of options when it comes to shared memory, locks, and so on.
- lmm 13y agoWhat do you mean by "rules out data races"? If I have one piece of code that writes two variables and another that reads them on another thread, there's no way for the compiler to know whether those two changes need to be atomic, serialized, or uncoordinated.
- dbaupp 13y agoI believe the "data race" definition pcwalton is using is the one from C++11: "a race condition between non-atomic variables". http://en.wikipedia.org/wiki/Race_condition#C.2B.2B http://en.wikipedia.org/wiki/Race_condition#C.2B.2B
- samnardoni 13y ago2 threads can't access the same variable in Rust without unsafe{}. I think, anyway...
- pcwalton 13y agoAccess to shared mutable memory without use of a synchronization primitive. It's the same definition data race detectors use.