logoalt Hacker News

vovavili • yesterday at 10:37 PM • 2 replies • view on HN

That is a confidently incorrect assertion.


Replies

Kamq • today at 12:16 AM

They said race conditions and specifically exempted data races. You can absolutely write race conditions in rust, they're a logic bug.

As an example, let's say you have two functions A and B. A only works properly if B has never ran for some reason. Let's say they both accept a reference to a value C, and B changes C's value somehow. Because this is rust, we can't have data races, so we wrap it in an ArcMutex or what have you. That doesn't impact the ordering of A and B at all.

If we spawn threads that execute A and B at the same time, it's up to the scheduler if A functions properly.

rrvsh • yesterday at 11:07 PM

You are being downvoted but you are absolutely correct. I have never seen someone assert Rust is a 100% safe. Its touted purely as a _memory_ safe language. To claim otherwise is absurd and very telling of the writer's biases

➕ show 1 reply