C++

C++26 Draft Fails National Body Vote Over Contracts Feature

For the first time, a C++ standard draft was rejected by national standards bodies, with the dispute centering on a feature called Contracts.

C++26 Draft Fails National Body Vote Over Contracts Feature
Source: MOND←TECH MAGAZINE

The C++ standardization process hit an unprecedented obstacle when the national bodies voted against the draft of C++26. Historically, this final stage has been treated as a formality, since disagreements are normally resolved earlier by the committee known as WG21. The vote fell short on both required thresholds: fewer than two-thirds of participating voting members said yes, and more than one quarter voted no.

The dispute centers on Contracts, a proposed set of keywords that would replace assert macros with a standardized way to check conditions at runtime, such as preconditions and postconditions on function arguments and return values. Critics raised concerns about how the feature interacts with virtual functions, constexpr, inlining, and compiler settings that can enable, disable, or change enforcement. Some have argued that the feature is too complex to be a minimal viable product, while supporters say it is the agreed-upon version that should ship.

Earlier committee votes had strongly favored including Contracts, which makes the final result surprising. Some observers believe lobbying by influential figures, including Bjarne Stroustrup, played a role, while others say many national bodies raised concerns on their own. Either way, the outcome points to deep division within the C++ community over the language's future direction.

Source: MOND←TECH MAGAZINE


Posted

in

by

Tags: