News for hackers. Stuff that matters.
Re:C++ the Good Parts (2014) by kevinventullo on Thursday October 01, 2020 @09:54AM (#24650804)
Does it really matter as long as it’s backwards-compatible? AFAIK one can write C++98, compile it as C++20, and most everything should still just work. So a developer can pick and choose which new features they want to use.
Re:C++ the Good Parts (2014) by rramadass on Thursday October 01, 2020 @10:23PM (#24658150)
You are in a sense both right and in another sense not quite so. You are right in that the language designers went to great lengths to maintain backward compatibility. So all my C++98/C++03 skills are still relevant today. When i see kids say how "modern and better" is C++11/xx i always reply, go read Coplien, Barton & Nackman, Koenig to understand where it all came from. On the other hand the cognitive overload imposed by the new features is substantial and there is a non-trivial learning curve even for experienced developers. Beginners have even more difficulty getting started. Result? Everybody lives within their "familiar subset" of the language. So codebases can be in C++ and yet two different developers can have difficulty understanding each other's codebase.
Re:C++ the Good Parts (2014) by guenthert on Thursday October 01, 2020 @01:28PM (#24653714)
What about the 'auto' storage class?
Re:C++ the Good Parts (2014) by gpderetta on Thursday October 01, 2020 @04:23PM (#24655788)
I wonder if it has been ever used on the wild outside of some compiler conformance test.

Anyway, it is true that C++ is not fully backward compatible, some things have changed in very important ways, but the vast majority of the code will compile unchanged and breakages should be caught at compile time.

Re:C++ the Good Parts (2014) by int_19h on Thursday October 01, 2020 @06:33PM (#24656871)
If you're dealing with a C++98 or C++03 codebase, you can literally remove every mention of "auto" in it without changing the meaning of the code.