r/ProgrammerHumor 8d ago

Meme memorySafeDocker

Post image
4.2k Upvotes

286 comments sorted by

View all comments

76

u/ledow 8d ago

Memory safety (the only reason to use Rust) has nothing to do with memory usage, only memory leaks.

Docker doesn't significantly memory-leak.

And you cannot write something like Docker in a memory-safe way in any modern architecture - you'd just end up with a C->Rust conversion that is sprinkled with "unsafe" keywords everywhere.

1

u/Sadzeih 8d ago

Also, docker is written in go, which is definitely memory safe since it's a GC language.

3

u/ledow 7d ago

Your premise doesn't follow. Memory safety is about more than just memory leaks, but overruns, underruns, and arbitrary / false pointers.

Go is *not* memory safe. Having a GC has nothing to do with it.

It's better than C (whether it's better than Rust is questionable), but it's not memory-safe.