News for hackers. Stuff that matters.
Re:C++26 Disapproved by LugosFergus on Tuesday November 03, 2026 @10:28PM (#50361206)
I get why some folks would like to see contracts in the language, but C++ is also buckling due to the shear complexity that's getting tacked on to it. I'd rather see more proposals such as C++26's "erroneous behavior" that attempts to reign in the language's shortcomings.
Re:C++26 Disapproved by airstrafer on Tuesday November 03, 2026 @10:55PM (#50361335)
Agree. There's an argument that Contracts reduces the complexity of using the language because it offers a more readable alternative to template metaprogramming (also, it has better error messages). But the argument really falls apart when you review WG21's track record for other features.

Like for example, Coroutines were billed as an easier way to write concurrent code, but personally I think it completely failed and ended up being hopelessly complex and confusing. Modules are the same - superficially they make things simpler, but when people actually go to adopt it, the details are so complex that nobody bothers.

Re:C++26 Disapproved by kllrnohj on Tuesday November 03, 2026 @11:58PM (#50361647)
I think you're confusing it with Concepts. Contracts are basically just asserts, nothing to do with templates.
Re:C++26 Disapproved by locknitpicker on Wednesday November 04, 2026 @01:29AM (#50362095)
> There's an argument that Contracts reduces the complexity of using the language because it offers a more readable alternative to template metaprogramming

Like most people in this thread, you should really read up on contracts before commenting. The contracts proposal is for runtime assertions, and their problem is that they are poorly specified and fundamentally broken. Their proponents haven't been addressing any of their concerns and tried to push a half baked version of them down everyone's throats, which was why they failed to pass.

Re:C++26 Disapproved by pjmlp on Wednesday November 04, 2026 @02:51AM (#50362544)
Some do bother, e.g. Microsoft Office uses modules, there is a talk on it.
Re:C++26 Disapproved by layer8 on Wednesday November 04, 2026 @02:49AM (#50362529)
*sheer
Re:C++26 Disapproved by MathMonkeyMan on Thursday November 05, 2026 @02:10AM (#50376093)
It's shear complexity because it's about cross-cutting concerns, or because it's a difficult yak to shave.