Stroustrup objects to adding Contracts to C++

strawberry9 strawberry9 at gmail.com
Mon Nov 9 21:21:27 UTC 2026


On Monday, 9 November 2026 at 00:40:29 UTC, Walter Bright wrote:
> https://www.stroustrup.com/Contracts_fundamental_flaws.pdf
>
> An interesting read, relevant to resurging interest in 
> improving D's contracts.

AI really benefit from having an explicit feedback loop for 
evaluating its work.

So from that perspective alone, I think contracts are very useful 
in the age of AI coding, as it provides an explicit specification 
for the intended behaviour (rather than trying to infer it from 
the surrounding code).

So yes, D should both keep and improve on it.

I'm thinking of adding contracts to CobaltC as well.

Nobody should really care about what C++ does... it's going to be 
replaced anyway...as it's not suitable for the AI age.


More information about the Digitalmars-d mailing list