A question about DbC
bearophile
bearophileHUGS at lycos.com
Sat Oct 9 06:00:44 PDT 2010
Denis Koroskin:
> Why do you think Walter disallowed throwing from
> contracts (other than asserts) in first place?
Probably because exceptions have no place in contracts. If a contract fails, the program is buggy, and it needs to stop. Contracts need to contain logical expressions that need to true for the contract to pass. And the compiler has to enforce the contracts statically as much as possible.
Thank you for all the answers. I'll add something in bugzilla soon.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list