Conversation

Go has GC and Rust doesn't. If you were to design an explicitly C-like language with memory safety and without GC, it would look a lot more like Rust than Go. The idea that Rust was designed by a bunch of C++ fans is absurd. Most of us were ML fans more than anything. t.co/SWJhLJptY3
This Tweet is unavailable.
3
238
This Tweet was deleted by the Tweet author. Learn more
The issue is that generics are basically a requirement for memory safety without GC as Rust does it. Otherwise you can't create safe abstractions, which would mean that every time you want a linked list you have to write unsafe code. That would undermine memory safety.
2
15
This Tweet was deleted by the Tweet author. Learn more
Go is only memory safe if you force the runtime to use a single OS thread. It's not memory safe by default. It doesn't pay the price of providing safety in the presence of data races like Java. The built-in map and slice types don't maintain memory safety during data races.
1
7
Replying to and
It's both garbage collected and memory unsafe. If you think this isn't a real world issue and couldn't be exploited, you would be very wrong. The approach it takes makes data races common: pass-by-reference for mutable data structures that are memory unsafe when races occur.
1
6
This Tweet was deleted by the Tweet author. Learn more
Slices and maps aren't implemented with locks and manage memory based on multi-word fields in a non-transactional way. It would be possible to make a memory safe implementation of those data structures but they're core data structures used everywhere and it'd destroy performance.
Replying to and
It doesn't have a way to prevent sending data structures between goroutines so every data structure should really be required to be thread safe, but they took the "worse is worse" approach of ignoring the problem and pretending the language is memory safe when it really isn't.
1