On 26/02/2016 20:51, stepharo wrote:
I like the idea that you package to postcondition, invariant and precondition not in the methods themselves but in separate methods. I did not think about that but this is nice because you do not pollute the code and we could put them in a precondition protocols. Yes that was the idea. to think about what your code should do without being in code logic or reading to much the code ie. keep it separated from the implementation . even with another browser like the tools pointed to by Stephan which looks really cool (the screen shots a least)
About the pragma why not
isEmpty
<preconditionOf: #add:>
I think that it is nicer than
<contract: #postcondition ....>
Yes much nicer ... And the same with <postconditionOf:..> much clearer
Now can you support the old value?
yes, I think no problem to support both that's a part I'll refactor anyway, it is a bit ugly because I changed several times and wanted to make my tests pass. Another point is that I would like to use it on itself, see how it runs on itself, but also how I can express it in terms of contracts ...
Stef
-- Alain