|
|
|
|
|
by jandrewrogers
30 days ago
|
|
That’s exactly my point. Contracts notionally offer the ability to lift some runtime assertions to compile-time. That is how it was sold. Except they don’t in practice. Meanwhile, concepts + constexpr if used artfully deliver that in practice, including for many cases that contracts were supposed to solve. I push all verification to compile-time to the extent possible. |
|
While the C++26 variant of contracts doesn't provide the benefits of its static-analysis-centric ancestor from 2014, and therefore isn't as consequential a feature, it still provides value to some and is absolutely not important enough to be worth killing a standard. Concepts do not provide this value.
In any case, it's simply false that C++26 contracts are unnecessary because we have concepts, yet this claim is the thrust of your initial comment.