On Friday, 3 October 2014 at 17:51:16 UTC, monarch_dodra wrote:

Also, I don't think "postconditions" are meant to check "callee" errors. That's what asserts do. Rather, postconditions are verifications that can ony occur *after* the call. For example, a function that takes an input range (no length), but says "input range shall have exactly this amount of items..." or "input shall be no bigger than some unknown value, which will cause a result overflow".

It sounds to me like we're saying the same thing.  Postconditions
test whether the function did the right thing.  This might be
validating the result or validating some internal state.

Reply via email to