The maintainers of the C++ standard are adamant about sticking to the clock, prioritizing a new version of C++ every three years rather than holding back each release till it is pumped with new features. With C++20 around the corner, the chair of the ISO C++ standards committee Herb Sutter explained why they have been going this route since 2012.
The language was invented by Danish computer scientist Bjarne Stroustrup as an extension of the C language before it was initially standardized in 1998.
RELATED CONTENT:
ISO C++ committee adds new features to draft C++20
C++ Core Guidelines
“[This model] closes the patient regularly and leads to sustaining higher quality by forcing regular integration and not merging work into the IS draft until it has reached a decent level of stability, usually in a feature branch,” Sutter said. “It also creates a predictable ship cycle for the industry to rely on and plan for.”
Sutter said he decided to explain the cycle process during this release due to the trove of questions that the committee receives at this point in the cycle every three years.
He added that the standards committee noticed greater volumes measured by feature counts (small to big) and higher quality as measured by a sharp reduction in defect reports and comments on review drafts of each standard, now that it was on a consistent time-based cycle compared to the vast gaps of time between releases prior to C++11.
C++ releases such as 98 and 11 were based on a model in which the committee picked the features and released updates only when the big features were ready. Now under the new release schedule, instead of going totally dark, new features can be shipped in a consistent manner, while the release of longer-term projects are held off until finished. When a feature is not finished by the three-year deadline, it is pulled out and can be merged again when it is “ready on the next IS ‘train’ to leave the station.”
After the unfinished projects are yanked, developers can do that work off to the side in “branches,” and merging them to the trunk/master IS when they’re ready,
C++20 will include some longer-term items that have been worked on since 2012 and only now are mature enough to merge into the IS draft, three of which involve “concepts, contracts and coroutines,” according to Sutter.
“We are on our planned course and speed: Fixing bugs is the purpose of this final year, and it’s why this schedule set the feature freeze deadline for C++“20” in early “19” (Kona), to leave a year to fix bugs including to get a round of international comments this summer,” said Sutter.
Kona was the February 2019 meeting at which the committee voted on what features will make it into the C++20 release. The specifications will be formally completed when the ISO team meets later this month.
Included in the new features are modules, in which developers will not be required to separate their files into header and source parts, and fixed internal linkage escaping modules. For coroutines, three new keywords will be added including co_await, co_yield, and co_return. The new concepts library will include the definitions of fundamental library concepts and a ranges library comes with components for dealing with ranges of elements. Additionally, the new release will include contracts which specifies interfaces for software components in a precise and checkable way.