Comment on Why should I use rust (as a Go enthusiast)?
darcy@sh.itjust.works 1 year ago
idk if youve heard but its memory safe
Comment on Why should I use rust (as a Go enthusiast)?
darcy@sh.itjust.works 1 year ago
idk if youve heard but its memory safe
firelizzard@programming.dev 1 year ago
I’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.
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.
darcy@sh.itjust.works 1 year ago
i think go is also considered memory safe due to the garbage collector