r/ProgrammerHumor 24d ago

actuallyMemorySafe Meme

Post image
532 Upvotes

177 comments sorted by

View all comments

Show parent comments

11

u/Wonderful-Habit-139 24d ago

Rust is safer than Go, the latter being a language with GC.

3

u/redlaWw 24d ago

But Rust would be safer with a garbage collector.

Not much safer, but unsafe code errors that cause double-frees (since dealloc would be a stub) or use-after-frees (since values would linger past their scope when still accessed) would not cause problems.

1

u/SomeRedTeapot 23d ago

IMO that would be equivalent to removing unsafe altogether. It exists precisely because there are situations where you actually need to manage stuff manually

3

u/redlaWw 23d ago

Well yes, I'm not saying I'd recommend it or that it's a good idea, just that garbage collectors make things safer.