DEV Community

Discussion on: Explain "Memory Safe Programming Languages" Like I'm Five Please

Collapse
 
alexgwartney profile image
Alex Gwartney

Think of it as a way to keep your program from going hay wire due to a human mistake. So the most basic example would be like Java that uses strict types and a garbage collector. Which helps avoid incorect types being allocated to memory space and garbage collection to help free up memory ect.

In short think of it as a way to keep the program from getting things like memory leaks or stack overflow issues. And its more handled by the language vs having to manually handle it your self.

Collapse
 
jefferyhus profile image
El Housseine Jaafari

This is not memory safety. Not a single compiler out there will stop a memory leak. Segmentation in the other hand is what Zig, Rust and many other are trying to avoid.

Collapse
 
alexgwartney profile image
Alex Gwartney

Technically it is memory safety, while it does not stop it completely, it does allow you to identify it? And try to keep it from happening in the first place? But what you said is also more of the full spectrum of the actual issue.