On 26/02/2016 11:26, Alexandre Bergel wrote:
Hi Alain,
Having contract is a valuable effort!
On Feb 26, 2016, at 11:12 AM, Alain Rastoul <[email protected]> wrote:
<contract: #ensured appliedTo: #( #add: )>
What does that mean?
<contract: #ensured appliedTo: #( #add: )>
Alexandre
Hi Alexandre,
a method with a pragma
<contract: #ensured appliedTo: #( #add: ) >
means it is a check that must be ensured by (enforced by) the method to
which it applies (here add:).
The add: method of the object *must* verify this check, when the check
is executed, it must return true.
May be the terms I've choosed are confusing at first, but it was
voluntary, preCondition, postCondition are too much program execution
oriented IMHO, not enough assertive .
btw it is easy to change:
one could say here:
<contract: postcondition on: #( #add: )>
may be better ?
or may be better to support both ... :)
Alain