Disallow side effects in assert

bearophile bearophileHUGS at lycos.com
Tue Feb 4 14:38:43 PST 2014


Marco Leise:

> Yes, this is definitely why asserts should not have side
> effects when they succeed.

Can't you define a impureAssert() in Phobos and use it for the 
few cases when you need it, and use a pure-only assert() for all 
other cases?

Bye,
bearophile


More information about the Digitalmars-d mailing list