Contracts are in C++26 despite disagreement over their value
Briefly

Contracts are in C++26 despite disagreement over their value
"Contracts are a means of setting preconditions and postconditions on function declarations, and adding assertion statements within functions. The feature is intended to help make C++ code safer and more reliable."
"Stroustrup said he will recommend not using contracts in C++. 'This is adding complexity in very obscure ways. It's changing the meaning of code depending on where it is... I worry a lot about the complexity, I worry about whether we can use it correctly.'"
The ISO C++ committee approved the C++26 standard on March 28, with Contracts as a major feature aimed at enhancing code safety and reliability. Despite its approval, Contracts faced opposition from C++ inventor Bjarne Stroustrup, who criticized the complexity it introduces. The committee also set a schedule for C++29, with work already underway. The C++26 proposal aims to deliver a minimum viable product, although it has gaps, such as the lack of support for contracts on virtual functions. Sutter advocates for Contracts, while Stroustrup expresses concerns about their viability.
Read at Theregister
Unable to calculate read time
[
|
]