Disallow side effects in assert

bearophile bearophileHUGS at lycos.com
Mon Feb 3 08:37:28 PST 2014


Daniel Murphy:

>>    assert(foo(x));
>
> Having the compiler see inside function bodies is problematic.

Why do you need that? You can tell that foo() is not strongly 
pure from its signature. That's enough.

Bye,
bearophile


More information about the Digitalmars-d mailing list