Hacker News new | ask | show | jobs
by gtirloni 1508 days ago
> With C++ realistically memory management is so hard

Honest question as I'm not a C++ developer: Even with all the new C++17/20 stuff?

2 comments

Problems with memory management are a fading memory when coding modern C++.

All the things Rust advocates insist cannot be done safely in C++ are now trivial. Use-after-free, leaks, buffer overruns, what-have-you, no longer need any attention to avoid if you stick to modern C++. Some people insist on coding as if it were C, and bring along all of C's failings. Leave them behind.

Unfortunely, only when working solo, or with a team that really embraces security.

Those people that insist on coding as if it were C are still a very big group across the industry.

The problem is that it's too late to add linear typing to C++ at this point and get rid of all other types. So I would say yes.