Which kinds of C++ projects will most benefit from the new standards?

After many years of the C++ standardization stagnation, the amazing story of modernizing it has just began. The standardization committee has now a mature process to deliver periodically new features and the known compilers are very reactive to implement them. Many new features are planned for C++17 and others will come in the next few years.

C++ is currently mainly used in these  sectors

  • Device driver development.
  • Games.
  • Financial software.
  • Processing ( Image, audio and scientific software).
  • Embedded software: We can enumerate Medical, Automotive, Aeronautics and Telecom industries.
  • Parsers and compilers.

Which ones of them  will move forward to the new standards?

Maybe the history of Modern C++ could help us to answer this question. Indeed many years ago, the modern C++ practices and idioms were introduced to improve the code quality of C++ projects. However, few sectors moved to it, many of them still use classic C++ mechanisms.

Concerning Device driver development and embedded software, they use mainly C, and for those using C++, they use widely the C with classes.

Most of the known game engines chose not to switch to modern C++, most of them use their own utility library for string manipulation, containers, files management, network classes and other useful low level utilities. The STL is rarely used and the generic paradigm is not widely used.

However, for the other sectors, some open source libraries moved to modern C++. For example the QuantLib library used in the financial area, uses widely the generic paradigm and Boost library. It implements many modern C++ idioms. The same remark is true for the processing libraries including image, audio and calculus libraries. But the modern C++ was not widely adopted, the C with classes and OOP still the most popular.

Will the story of Modern C++ be repeated again with the new standards?

The modern C++ uses extensively the generics, and for many years the C++ developers find this paradigm more complicated than the classical C++. The compiler errors are not very clear and the code becomes not easy to read and maintain. These kinds of problems discourage many teams to move to Modern C++. And for the same reasons some of the new C++ features could be ignored by many C++ developers, mainly those concerning templates. Fortunately, most of the new features are very easy to understand and use, and they bring a big added value to the project.

And to be realistic, not all new features will be adopted by C++ developers, some of them are good candidates to be widely used like “auto”, “enum class”,” Initializer  lists”, “Range-based for loop”, “explicit overrides and final” and “null pointer constant”. Others such those concerning templates will be more adopted by libraries (Boost, Folly…) developers.

Some resources follow a pragmatic approach and focus on new C++ features candidates to be widely used; “Effective modern C++” from Scott Meyers is one of them. It discusses mainly the features easy to understand and use.

What could happen in the next few years is that a subset of new standards will be widely adopted and the other ones will be more used by libraries, and the C++ developers will use them indirectly. And if we exclude device driver development and embedded software, all the other kinds of projects have lots to gain if they use some new C++ features.

To resume some new C++ features will be ignored by many C++ developers, like what happens with the modern C++. However, many ones are good candidates to be used in a variety of C++ projects.

Leave a Reply

Your email address will not be published. Required fields are marked *