C++26 stumbles at finish line over Contracts dispute
ISO working group faces a fight over runtime checks, complexity, and the language's release timetable
The upcoming C++26 programming language version may face a delay due to a dispute over Contracts, a security-enhancing feature. This feature has split C++ technical maintainers. While some support Bjarne Stroustrup, the C++ creator, who opposes Contracts due to its rushed implementation, others advocate for its implementation. The disagreement erupted shortly before a vote to approve the new language version.
In October, the C++26 Draft International Standard (DIS) failed its ISO ballot during the final stage of standard ratification. The ballot had 13 votes in favor, 9 against, and 12 abstentions, failing to meet the ISO requirement of limiting negative votes to 25 percent. Contracts, the primary issue for those voting against, are features that enable developers to add preconditions, postconditions, and assertions to code, helping detect programming errors.
Contracts have been proposed for inclusion in C++ for at least a decade, with Stroustrup criticizing the revised proposal in C++26. He termed it an "existential threat" to C++, adding complexity and bloat, while other committee members argue the criticisms have been addressed. The controversy arises from worries about security vulnerabilities in C++, leading many projects to adopt Rust.
Stroustrup's stance risks delaying the C++26 release, potentially resulting in developers referring to it as "C++27."
Written by urgent.news from The Register Science's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.
- C++26 stumbles at finish line over Contracts dispute theregister.com