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

> What does rust have to do with thread safety and race conditions? Is rust going to synchronize shared memory access for me?

Rust’s strict ownership model enforces more correct handling of data that is shared or sent across threads.

> Speaking seriously, they surely meant data races, right? If so, what's preventing me from using C++ atomics to achieve the same thing?

C++ is not used in the Linux kernel.

You can write safe code in C++ or C if everything is attended to carefully and no mistakes are made by you or future maintainers who modify code. The benefit of Rust is that the compiler enforces it at a language level so you don’t have to rely on everyone touching the code avoiding mistakes or the disallowed behavior.



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

Search: