1. Contracts as a pragmatic alternative to exceptions for precondition checks
Many commenters see contracts as a cleaner way to express and enforce expectations like “the widget must be Gonzo,” with selectable enforcement modes (quick‑enforce, enforce, observe, ignore).
“With Contracts you write a contract for the function with a pre‑condition that the Widget is Gonzo. Your users … can pick: If they fail a contract the program exits immediately reporting a violation …” – tialaramex
2. Contracts are fundamentally runtime features; compile‑time checking is limited and would need whole‑program analysis
While some hope for static contract verification, most agree that current contracts are enforced at runtime, and compile‑time checking would require extensive analysis that isn’t feasible today.
“C++ contracts are not a compile‑time construct, they're a runtime construct.” – steveklabnik
“…most contracts realistically need whole program analysis to diagnose and no compiler can do that …” – bluGill
3. The inclusion of contracts in C++26 is controversial, reflecting broader tensions in the standards process
Opinions split sharply; some view contracts as a useful compromise, while others (including influential figures like Bjarne Stroustrup) argue they are premature and threaten to veto the standard over their inclusion.
“The current contracts are not good enough for anybody who wants them … but it is good enough that they can start figuring out the details of making all the different factions happy.” – bluGill
“Bjarne is threatening to get a national body to veto the proposal so that there is no C++26 at all.” – whateverboat
“Contracts has the problem that everybody has a slightly different idea of what they want from the feature… there are few people who are vehemently against the current compromise.” – jcranmer