DEV Community

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

Collapse
 
rsenna profile image
Rogerio Senna

And Rust is like parents with very strict rules. They won't help you, only forbid you of doing some things. And if you manage to burn yourself anyway they will tell you "Your fault, we warned you but you didn't listen"!

Collapse
 
rsenna profile image
Rogerio Senna

And Java, C#, Python are like "Don't worry, go play, we will clean it up everything afterwards" 😅

Thread Thread
 
jendoodle profile image
Jen Lewis

Except for event listeners. I know C# doesn't completely clean up event listeners (not sure about java). One of the nastiest memory leaks I've seen in my career was from not unsubscribing to event listeners properly. Funnily enough this was on a government project also.

Collapse
 
rdrpenguin04 profile image
Ray Redondo

I'd more say Rust is like parents that trust you. They will tell you what to do unless you can tell them why you don't want to do it, and they'll let you find out the consequences of your ignorance then :)