Re:Async Rust Is A Bad Language
by Animats on Friday September 08, 2023 @01:36PM
(#37436752)
That was the argument for Go. But Go is not used that way. People still share and lock stuff in Go. Go is only safe for race conditions that break the memory model, not all race conditions, as Rust is.
[ Parent
| on HN ]
Rust protects against data races, not race conditions.
Re:Async Rust Is A Bad Language
by Ar-Curunir on Friday September 08, 2023 @05:34PM
(#37439718)
[delayed]
Go cannot catch data races at compile time (like Rust) but can catch a subset of data races at run time with the race detector. Go provides imperfect, opt-in protection.
Technically, you can break Go's memory model via race conditions: Write to an interface on one thread while reading it from another and you may read the old vtable pointer but new data pointer / the other way around. Same goes for slices with data/length/capacity.