News for hackers. Stuff that matters.
Re:Thoughts on Go vs. Rust vs. Zig by andsoitis on Thursday December 04, 2025 @07:02PM (#46155063)
> so does the rust compiler check for race conditions between threads at compile time?

My understanding is that Rust prevents data races, but not all race conditions. You can still get a logical race where operations interleave in unexpected ways. Rust can’t detect that, because it’s not a memory-safety issue.

So you can still get deadlocks, starvation, lost wakeups, ordering bugs, etc., but Rust gives you:

- No data races

- No unsynchronized aliasing of mutable data

- Thread safety enforced through type system (Send/Sync)

Re:Thoughts on Go vs. Rust vs. Zig by throwawaymaths on Thursday December 04, 2025 @07:03PM (#46155088)
and you can have good races too (where the order doesnt matter)
Re:Thoughts on Go vs. Rust vs. Zig by oconnor663 on Saturday December 06, 2025 @12:39PM (#46175087)
Yeah it's worth emphasizing, if I spawn two threads, and both of them print a message when they finish (and don't interact with each other in any other way), that's technically a race condition. The output of my program depends on the order on which these threads complete. The question is whether it's a race that I care about.