Hacker News new | ask | show | jobs
by tobias12345 248 days ago
How will porting a single concept like `defer` from zig, a language that is not memory safe, to C and C++ make those memory safe?

`defer` is a poor man's RAII. C++ has had RAII since the beginning, and C++ is still not considered memory safe. So how will adding `defer` help C++ to become memory safe?

This feels like another example of how poorly C and C++ devs understand the ideas behind memory safety. You do not really need to understand this concept, as long as you can debug all the memory issues that just pop up:-)