Your post could do with a bit of editing (to trim it down — seems a bit repetitive). Also, splitting into sections with each section having a clear point rather than just running on.
One thing you didn't mention is that modern C++ (which is C++ ≥ 11) can, with some discipline, be used in a more memory-safe way via things like never using either new or delete explicitly and instead relying on std::unique_ptr and related classes.
I am a data scientist and the author of "Deus In Machina" on Substack. If you end up checking it out, I hope you enjoy your time at the digital hearth :)
https://www.deusinmachina.net/
I touched a little bit on this with the Linux Kernel talk and GCC's move to C++, but I could have expanded it. I definitely think that C++ is safer than C and that C++11+ is a great way to achieve that. But my observations within the C++ community is not in agreement that modern safe C++ is the way forward
For the first link, it's not clear which of the 4 posts that links to is the one I'm supposed to read. For the second link, the fault isn't C++'s since the smart pointers are being turned back into raw pointers and handed off. That's what I meant by "with some discipline" — which those programmers didn't exhibit.
Unless your entire software stack is written in a memory-safe language, then at some point, you're going to end up calling something written in C. If you do that wrong, the memory-safe language won't save you.
For projects written in "old" C++ — or even C — it's a lot less work to modernize them by using "modern" C++ than it is to rewrite everything in a memory-safe language.
Sure, if you're going to start a brand new project from scratch, strongly consider a memory-safe language; but you can still do better with the legacy code.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your post could do with a bit of editing (to trim it down — seems a bit repetitive). Also, splitting into sections with each section having a clear point rather than just running on.
One thing you didn't mention is that modern C++ (which is C++ ≥ 11) can, with some discipline, be used in a more memory-safe way via things like never using either
newordeleteexplicitly and instead relying onstd::unique_ptrand related classes.I touched a little bit on this with the Linux Kernel talk and GCC's move to C++, but I could have expanded it. I definitely think that C++ is safer than C and that C++11+ is a great way to achieve that. But my observations within the C++ community is not in agreement that modern safe C++ is the way forward
And I have been recently swayed to believe the same
For the first link, it's not clear which of the 4 posts that links to is the one I'm supposed to read. For the second link, the fault isn't C++'s since the smart pointers are being turned back into raw pointers and handed off. That's what I meant by "with some discipline" — which those programmers didn't exhibit.
Unless your entire software stack is written in a memory-safe language, then at some point, you're going to end up calling something written in C. If you do that wrong, the memory-safe language won't save you.
For projects written in "old" C++ — or even C — it's a lot less work to modernize them by using "modern" C++ than it is to rewrite everything in a memory-safe language.
Sure, if you're going to start a brand new project from scratch, strongly consider a memory-safe language; but you can still do better with the legacy code.