News for hackers. Stuff that matters.
Re:C++ the Good Parts (2014) by threatripper on Thursday October 01, 2020 @05:49AM (#24649157)
C++ probably needs an "unsafe" keyword like Rust to isolate the non-"good parts". A few hundred compiler flags could be used to distinguish the good and non-good parts. I don't think that 5 years is enough to know all things C++; it's like a black hole in the sense that it adds features faster than you can learn how all the different parts could interact - even if you dedicate your whole life to it. Maintaining old C++ codebases will employ a lot of old developers for many many years. Your employer should not expect you to understand an old code base if you are a new developer. This would even be counter-productive since it wastes your brain power and their money.

What modern C++ really needs is a rebranding. Something like "C22"/"CX"/"Z" to distinguish itself from old C++. Together with a guide on what the safe features and "unsafe"/deprecated features are the developers could get new certificates to prove that they are up to date. Companies/management could easily require that the new C++ is used and developers are actually capable. (This organizational issue is IMHO the most important part.)

Re:C++ the Good Parts (2014) by pjmlp on Thursday October 01, 2020 @06:05AM (#24649245)
It already kind of has it, it just requires a bit more of love and fewer false positives.

https://docs.microsoft.com/en-us/cpp/code-quality/using-the-...

Re:C++ the Good Parts (2014) by shultays on Thursday October 01, 2020 @08:35AM (#24650164)
it is called "new" and "delete"

but yeah, there is more to that and I doubt C++ can be fully unsafe unless you set references and pointers (they can be invalidated) probably many other things as unsafe. c++ is unsafe by design