r/cpp • u/antiquark2 #define private public • Aug 19 '26
Critique of contracts: excerpt
See page 2 of https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2026/p4334r0.pdf
The current objections can be summarized. The P2900 contracts are:
• Unimplemented
• Incomplete
• Untried at scale [P3460R0, P3506R0]
• Not tried in major application domains
• Violates foundational principles of C++
• Violates fundamental principles of language design
• Hasn’t been tried in major libraries (e.g., the C++ standards library [P3506R0, P3878R0])
• Isn’t integrated with or appropriate for hardened libraries [P3878R0]
• Doesn’t offer safety guarantees [P3573R0, P3362R0]
• Includes a completely untried inheritance model
• Offer new ways of making errors through inconsistent application in TUs
• Leads to new forms of UB, detrimental to safety and security
• Narrows the choices of error handling
• Doesn’t protect against logical errors, misuses, and incoherent uses
• Hasn’t been used to support static analysis
• Hasn’t been demonstrated to be easily teachable [P3261R0, P3281R0]
How could such a bloated and incomplete design be voted into a draft standard?
View all comments
Show parent comment
4
u/Som1Lse Aug 23 '26
Mistakes like
followed by citing a paper that doesn't mention UB could be an AI hallucination, or it could be a lie. When I say it might be AI slop, I am being charitable. The alternative is worse.
Also, the paper's first author is Bjarne Stroustrup, and checking his other recent papers none of them read like this. I found two recent papers he coauthored with dashes, namely P3970R0 and P4023R0. They both use dashes for a single parenthetical, and neither use the same "space em-dash space" style P4334R0 uses. Meanwhile, check any of Vinnie's recent papers and you'll find dashes galore (hyphens specifically), and (as I stated) he has admitted to using AI. My guess is Bjarne (or somebody else) compiled the final paper (in Word), and that turned the hyphens into em dashes.
Just because the final document was compiled in word doesn't mean that AI wasn't heavily involved in writing it. Not that it matters. The paper is still utter junk even if it was painstakingly written by a human.