3 ms·
Yes. Programming in C++11 was an overwhelmingly better experience than before. C++14 is, additionally, much more fun. Coding C++17 is better than C++14, mainly
by pencilguin 4y ago
Yes. Programming in C++11 was an overwhelmingly better experience than before. C++14 is, additionally, much more fun.
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.
- rhn_mk1 4y agoWhat makes you say that C++ is leading in productivity? I'm not seeing C++ web applications, or machine learning frameworks. From my own experience, managed languages are easier to write for as well, especially with the average C++ code base which barely touches upon C++14. 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.
- themoonisachees 4y agoVideo games are overwhelmingly coded in c++. C# is now more and more popular because of unity, but most AAA games (and their engines) are still made in c++. Also consider the large amount of qt-based apps still running c++.
- rhn_mk1 4y agoIn the case of game engines, productivity is less important than performance. Most games use some scripting language on top of 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.
- nottorp 4y ago>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...
- jcelerier 4y agoHaving done lots of both QML and QWidgets there are many tasks for which I feel I'm more productive on the latter. There are also regular posts on the Qt mailing list asking for a complete c++ version of Qt Quick, and people who kinda implemented a similar thing in another library (QSkinny iirc?) 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
- specialist 4y agoI accept your claims that modern C++ improves productivity. As well as joy. :) In your experience, are these improvements available to existing code bases, green field projects, or both?
- pencilguin 4y agoIn existing code bases, new subsystems can be fully modern. 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.