In the end I think c++11 did make things way better and less error prone than before, largely through new features.
In the end I think c++11 did make things way better and less error prone than before, largely through new features.
Coding C++17 is better than C++14, mainly for its destructured bindings and improved variadics.
Coding C++20 is much better, again. chiefly because of Concepts, but co-routines will become increasingly important as library support surfaces.
It has been a long time since I shipped a memory usage fault. Languages that promise to make those impossible are hyped now, but their promoters are "fighting the last war".
What makes the difference today is productivity. C++ is still leading that charge. Hype notwithstanding, more people take up programming C++ professionally in any given week than the total paid to code Rust. Soon, many of those Rust coders will begin to jump ship for newer languages.
If productivity is "the current war", then languages like Go, Python, Rust, Elixir, and TypeScript are definitely fighting it, and it's not clear to me that any has significant lead in anything but limited areas.
Also consider the large amount of qt-based apps still running c++.
I agree that C++ is somewhat productive through Qt, but then again Qt is just one area of many - and QML is an acknowledgement that JS can bring greater productivity than C++ within Qt.
That's not what my friends who still do Qt jobs tell me. They consider it more of a hindrance because you're limited in what you can do. And it's buggy.
But I guess if all you know is javascript...
Like, in c++, I just type approximately what I want, especially when writing glue code or creating a new api, and add compile-time checks & fix compiler errors until things build which is a super fast process ; with QML (or other less strict languages) it takes much more time in a slower edit-run cycle to write correct code.
And this is mainly due to new c++ features: what would have taken fifty lines to define a static check for in c++03, 30 in c++11/14 with e.g. enable_if, takes at most a couple in c++20 with concepts
In your experience, are these improvements available to existing code bases, green field projects, or both?
Old code can be modernized incrementally, e.g. replacing uses of naked pointers with smart pointers and then deleting destructor code, or replacing C-style for-loops with modern range-style for-loops or calls to standard algorithms, passing a lambda. Many class declarations can be eliminated by using lambdas inline. A sweep throughout a big codebase just modernizing one kind of thing may take only a few days. This typically results in deleting a great deal of code, and all the bugs in the deleted code evaporate.
Deleting masses of code always feels great.