3 ms·
One other underappreciated point is how to deal with other resources besides memory. Go has a GC, which helps with memory, but you're entirely on your own for
by tene 6y ago
One other underappreciated point is how to deal with other resources besides memory.
Go has a GC, which helps with memory, but you're entirely on your own for files, sockets, database connections, mutexes, channels, etc.
The features that Rust uses for memory management are fully general-purpose, and also help you with safely handling all other kinds of resources.
Consider how many ways you can misbehave with a Mutex in Go that are all caught by rustc at compile-time. This has nothing to do with memory management, but the same thing that prevents use-after-free is what also prevents using a mutex-protected value after releasing the lock.