News for hackers. Stuff that matters.
Re:Data Race Patterns in Go by Groxx on Saturday June 11, 2022 @04:28PM (#31708040)
If someone is claiming the garbage collection means freedom from data races, they are unambiguously wrong.

Garbage collectors solve double-free bugs and usually memory leaks due to cyclic references.

Re:Data Race Patterns in Go by eru on Monday June 13, 2022 @01:01AM (#31721370)
Yes. Though garbage collectors can have an indirect influence on the design of the language, that makes it easier to handle data races.

(As an example, image how much simpler Rust would be, if they went with garbage collection. Or how much more machinery Haskell would need, if they went with Rust's memory management strategies.)

Re:Data Race Patterns in Go by Groxx on Monday June 13, 2022 @12:42PM (#31727994)
I'm not sure what Rust would gain from a garbage collector - it'd still need all of lifetimes for instance, because ownership is the necessary piece for preventing races.