Experts in C++ agree on moving existing project to new standard or even use the latest one if you are starting a project. Most of the time discussion ends with “X is only available since C++[YY].
So obviously people like me ask what is this new X feature doing? This will be answered with a bunch of reasonable (ahem..) explanation of why X is best of all. But more that 80% of time, I see developers trying to find a proper usage of these new c++ features in projects. They don’t need to to but they have to.. IMHO, this sucks in coding for obvious reasons. I am not saying because of “Tale of two rewrites” post. A basic course is software design is enough to learn this rule.
“The idea of justifying your code with language and or it’s particular standard becoming more common than ever in C++ world!”
Language and their special features are for programmers to solve a problem not to make a new one or to augment complexity of your code. When new features/changes are out; the code which was written before becomes automagically invalid or second class.
They all got tagged with “well, these code is written 10 years ago with such and such bad practice“. So you must rewrite it now so that it will become a bad practice in next 10 years and we will have same discussion again!.
Question: Why do people keep using this bad practice ? Is this because of the language?
Answer: No. It is not language. It is how people learn these languages!
Well, this is not true for all languages. Sure every language defines bad and good practices. But in case of C++, it is exponential and has something to do with its design. Code is becoming so complex in C++ such a way that people thinks it got super performant and less buggy. phew.. .
C++ is taking a functional programming approach something lisp, scheme did years ago.. And if you ask someone about using lisp or scheme, they would argue that you don’t have enough people who know these languages. [Deep Sigh..]
What about all new features of c++17 or c++14. Even if nobody knows all, they keep using it because “It is C++ and we know it”. [Silent response: No, you don’t ]. At this point it might be a good idea to read Ted’s blog on features. here and here
How many of you benchmark your code before and after changing it to new c++ standard?
Most of them don’t do any test or reviews. They just move on to new features because someone said it is and it has to be cool. After all, people don’t publish fake news on THE internet. Right? wink, wink,