Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Go's concurrency is unsafe? Rust's concurrency is automatically safe?

Yes and yes...

Rust statically enforces that you don't have data races, i.e. it's not possible in Rust (without unsafe hacks) to forget to guard access to something with a mutex. In every other language this is enforced with code comments and programmer memory.



As long as that something is in the process's own memory.


Correct, rust doesn’t magically prevent all bugs. It just makes a large class of bugs harder to write.


.. but most concurrency is done in distributed systems, where Rust provides little to no protection.

Although making a Rust monolith would be great!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: