VYPR
patchPublished Nov 13, 2026· Updated Nov 21, 2026· 1 source

C++26 Standardization Stalls Over Contentious 'Contracts' Feature Dispute

The C++26 programming language standard faces a potential delay due to a deep-seated disagreement over the inclusion of a 'Contracts' feature, which aims to enhance code security.

The upcoming C++26 programming language standard is at risk of a last-minute delay following a significant dispute over the inclusion of a 'Contracts' feature. This feature, designed to bolster code security by allowing developers to specify preconditions and postconditions, has become a major point of contention among C++ technical maintainers, dividing the community and jeopardizing the ratification process.

The disagreement reached a critical juncture when the Draft International Standard (DIS) for C++26 failed its ISO ballot in October. With 13 votes in favor, 9 against, and 12 abstentions, the ballot did not meet the International Organization for Standardization's requirement of having no more than 25 percent negative votes. The 'Contracts' feature was identified as the primary reason for the 'no' votes, highlighting the depth of opposition to its inclusion in its current form.

'Contracts' allow developers to embed checks for preconditions, postconditions, and assertions directly into their code. These mechanisms are intended to catch programming errors early, preventing undefined behavior and improving overall code reliability, a concept known as Design by Contract, which has been a staple in languages like Ada and Eiffel for years. While proposals to integrate Contracts into C++ have been around for over a decade, previous attempts were withdrawn due to concerns about default behaviors.

However, the revised proposal (P2900) that made it into the C++26 draft has drawn sharp criticism from prominent figures, including C++ creator Bjarne Stroustrup. In a paper published last August, Stroustrup and his colleagues argued that the Contracts feature, as implemented, adds unnecessary complexity and bloat to the language. They also raised concerns about the implementation being messy, outdated, insufficiently tested, and suggested that a library-based approach would be more effective.

Conversely, proponents like Andreas Fertig, a member of the C++ standardization committee, argue that the criticisms are being raised too late in the standardization cycle and that the feature has already undergone extensive vetting and multiple majority votes. Fertig expressed concern that rejecting the proposal at this stage undermines the trust and collaborative spirit of the C++ development process. He accused the dissenting parties of being 'sore losers' who are unwilling to accept compromises inherent in any standardization effort.

The debate over Contracts also touches upon a broader concern within the C++ community: the language's perceived susceptibility to security vulnerabilities, which has led some projects to adopt Rust. While Contracts could potentially mitigate some of these issues, Stroustrup's camp fears they might compromise C++'s renowned performance.

Harry Bott, CEO of the C++ Alliance, offered a more pragmatic view, stating that the ballot's failure is not a sign of process breakdown but rather the process functioning as intended. He emphasized the need to learn from the experience to strengthen the standardization process for future evolution.

With the C++26 ballot failing so late in the process, the language is now at risk of missing its anticipated release date this year, potentially leading to its informal designation as 'C++27.' The ISO C++ working group WG21 is scheduled to meet next week in Brazil to confront this issue. Options on the table include carving Contracts out of the C++26 specification to allow the rest of the standard to proceed, moving the Contracts feature to a separate technical specification for further refinement, or attempting a minor revision and re-voting.

Synthesized by Vypr AI