On 2010-03-04 13:19:25 -0500, Norbert Nemec <[email protected]> said:

Exactly my point: contracts are not assertions.

Still, contracts are not exceptions either. A broken contract is a BUG. A triggered exception is a run-time condition that can happen in a perfectly correct program.

I think a big problem today is that "in" contracts are enforced as part of the function. They should be checked at the call site because "in" contract check for bugs in the calling code. That would make all entry points to a library validated when the calling code is compiled in debug mode, even if the library is compiled in release mode.


--
Michel Fortin
[email protected]
http://michelf.com/

Reply via email to