i think go is also considered memory safe due to the garbage collector
Comment on Why should I use rust (as a Go enthusiast)?
firelizzard@programming.dev 1 year agoI’d have to be living under a particularly large rock to be unaware of that. “It’s memory safe” isn’t that big of a deal to me. Even building concurrent systems, memory safety has never been a significant issue for me with Go.
darcy@sh.itjust.works 1 year ago
Lmaydev@programming.dev 1 year ago
Go is memory safe due to its garbage collection. Which adds a decent overhead generally.
Rusts memory safety is enforced at compile time and therefore has zero cost at runtime.
For a system level language this can be really important.
firelizzard@programming.dev 1 year ago
In my book, “memory safety” also means avoiding data races. AFAIK Rust prevents most or all races by enforcing ownership and lifetime of pointers.