A problem with D contracts

Walter Bright newshound2 at digitalmars.com
Sat Jul 31 23:19:30 PDT 2010


bearophile wrote:
> You have missed half (well, two thirds) of what I was trying to say. It's not
> just about enforcing purity (or just @readonly of names in outer scopes), but
> it's also a problem of automatic analysis of notation (code). If you have
> generic D code it's harder to perform inferences on it. That's the purpose of
> those forall, etc, I have tried to talk about (and maybe you have also missed
> the part about the relation between code size and bug-prone nature of
> contracts).

It is not easier to statically analyze a forall rather than a foreach.

I also see no evidence that foreach is more bug-prone than a forall would be.


More information about the Digitalmars-d mailing list