Synopsis 4 says:

"PRE and POST must return boolean values that are evaluated according to the
usual Design by Contract rules."

Do "the usual Design by Contract rules" include the ability to "turn off"
(i.e. remove from program flow) PRE and POST blocks for performance reasons
in production, or is than an anathema to the DBC crowd? :)

I know you can do debug-assertions-like things with macros, but then you
have to decide how expensive your pre/post checks are.  The very expensive
checks have to go into macros that you can "turn off" in production.  But
the cheaper stuff can stay in PRE/POST blocks (assuming they can't be turned
off).  Seems like an odd split...or am I over/under-thinking this?

-John


Reply via email to