3 ms·
Rust is more multi-threading safe than GC languages because of the borrow checker: https://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html https://blog.
by legulere 7y ago
Rust is more multi-threading safe than GC languages because of the borrow checker: https://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html https://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.h...
- dom96 7y agoI don't think this is a fact for _all_ GC'd languages. For example, Nim is a GC'd language and it's also multi-threading safe. It perhaps doesn't give as much freedom as Rust, but it does still achieve safety. The compiler restricts sharing of memory because each thread gets its own GC, and for locks the compiler verifies that variables are locked [1]. 1 - https://nim-lang.org/docs/manual_experimental.html#guards-and-locks-guards-and-the-locks-section https://nim-lang.org/docs/manual_experimental.html#guards-an...