News for hackers. Stuff that matters.
Re:C++26 Disapproved by AlotOfReading on Tuesday November 03, 2026 @11:37PM (#50361548)

    The weakness of C++ contracts is that they are mostly syntactic sugar over C asserts. 
That's actually one of my issues with them. The evaluation semantics are much more complicated than C asserts because of the sugar, and why you would have to pay those costs isn't obvious at first glance. Lisa Lippincott's excellent talk on the design of contracts [0] is what switched me from a sort of neutral support to disliking it. I think it's a stupid place for the national bodies to draw the line though. std::regex is acceptable, but a nothingburger like contracts tanks the vote?

[0] https://www.youtube.com/watch?v=yhhSW-FSWkE

Re:C++26 Disapproved by jandrewrogers on Tuesday November 03, 2026 @11:43PM (#50361576)
To be clear, I have a lot of issues with the contracts proposal. I probably wouldn’t use despite living out on the standards frontier. I don’t even use C asserts already because they are not expressive enough in important ways. This proposal kind of reifies the inadequacies.

I think the risk is that C++ contracts become an evolutionary dead-end that hang around forever in code bases because they were standardized. It wouldn’t be the first time this has happened.

Re:C++26 Disapproved by randomNumber7 on Wednesday November 04, 2026 @04:05AM (#50363034)
What do you do instead of C asserts? Throwing exceptions?