C ++ 20: the new features of the update expected at the end of 2020


The new version of the programming language, the most important since 2011, will provide two new features: modules and coroutines.

C ++ 20 will be the biggest update to the language in almost 10 years. © oatawa – stock.adobe.com

Named C ++ 20, the new version of the C ++ language unanimously received its final technical approval on Friday, September 4, by the working group dedicated to it within the International Organization for Standardization (ISO). According to Herb Sutter, Microsoft engineer and chairman of the ISO C ++ committee, C ++ 20 will be “ largest version of C ++ since C ++ 11 “. This new language standard, which is updated every 3 years, will therefore be more important than the previous three. It will also be the first standardized version.

What’s new in C ++ 20

On the occasion of this major update of the programming language created in the 1980s by Danish computer scientist Bjarne Stroustrup, two new features are particularly awaited by developers: modules and coroutines.

Modules, an alternative to header files

This new feature, whose dedicated working group is led by Richard Smith of Google, represents a new alternative to header files. Modules must be able to isolate the effects of macros and will support upgradeable versions.

I personally find this feature very important for several reasons, but the most fundamental is that this is the first time in about 35 years that C ++ has added a new function that allows users to set a named encapsulation limit, Herb Sutter explains in the account of an ISO working meeting.

Coroutines and other C ++ 20 features

Coroutines are functions that can suspend and resume execution without changing their state. They aim to generalize the use of subroutines in non-preventive multitasking. Note that support for these coroutines in the standard library is planned for version C ++ 23.

Among the other new features expected from C ++ 20, we also find the presence of a synchronization library, improvements in the processing of compilation time, feature test macros and even new telemetry algorithms.

The biggest version of the language for almost 10 years

C ++, which is used in particular in the development of computer games, is an essential language for Google as well as Microsoft and its Windows operating system, the first version of which was launched in 1985. If the American publisher works in parallel with Rust , developed by Mozilla, in order to replace the existing Windows code written in C and C ++ to benefit from the security qualities offered by Rust’s memory, it remains a fast language appreciated by many developers.

In the TIOBE ranking of September 2020, C ++ thus appears in 4th position in the index of the most popular programming languages, behind the trio made up of C, Java and Python. C ++ 20 is expected to be released by the end of the year, after the end of the ISO editorial cycle.

Receive all digital news by email