Program logic bugs vs input/environmental errors
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Sun Nov 9 13:15:46 PST 2014
On Friday, 7 November 2014 at 15:00:35 UTC, Bruno Medeiros wrote:
> Very well then. But then we'll get to the point where enforce()
> will become much more popular than assert to check for contract
> conditions. assert() will be relegated to niche and rare
> situations where the program cant really know how to
> continue/recover cleanly (memory corruption for example).
>
> That idiom is fine with me actually - but then the
> documentation for assert should reflect that.
This looks like a only practical solution for me right now - but
it is complicated by the fact that assert is not the only Error
in the library code.
More information about the Digitalmars-d
mailing list