Stroustrup objects to adding Contracts to C++

monkyyy crazymonkyyy at gmail.com
Mon Nov 9 00:55:46 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.

contracts in Phobos create additional dependencies and more code 
generation

while I dont think phoboes 2 hyper interconnected design couldve 
been avoided by just 1 change, there are just cases where an 
otherwise free function goes from 0 to 1 dependencies and if 
average node order is >1 the entire graph is expected to be 
connected

Dont "improve" contracts, just drop them from the style guide, 
especially going from 0 to 1 imports on otherwise trivial 
functions


More information about the Digitalmars-d mailing list