Stroustrup objects to adding Contracts to C++

Walter Bright newshound2 at digitalmars.com
Wed Nov 11 22:49:01 UTC 2026


On 11/11/2026 4:37 AM, Richard (Rikki) Andrew Cattermole wrote:
> Effects analysis in dmd is DOA in the type system.
> 
> It cannot do it correctly.

It cannot do it for cyclical flow graphs, and for modules where the source code 
is not available to the compiler.

Otherwise, it does it correctly.

> Walter screwed up designing the architecture for dmd's semantic analysis when he 
> designed it to be fast and not for analysis capabilities.

You keep overlooking the fact that dmd's optimizer does full DFA analysis. It is 
restricted to intra-procedural, because inter-procedural results in an 
exponential increase in compile times, with little corresponding benefit.


> See: attribute soup. Without inference working correctly, this problem cannot be 
> fixed, and we can't fix it.




More information about the Digitalmars-d mailing list