Now can you support the old value?
Sorry I responded too quickly, I thought you where talking of the
syntax (no problem)
but you mean the value before the call I guess.
I didn't understood at first.
yes it should be possible too, a bit trickier, with an small extra
cost in performance but cool
You see this is a lot more difficult than it appears. ***Ideally*** old
should be a full copy of the object :)
But we can live with an approx solution.
In any case I would really love to see if we can have contracts in
classes in Pharo libraries and
see how it improves them.
I would like to see the performance penalties.
What we could have is the following:
When we run the tests we run them twice
One with contracts on and one without contracts.
- first the results should be same :)
- second the contracts should be working
Then we could start to have test harnessing (I know that guys from
argentina did some libraries for that)
and we could have better tests and find bugs in code by using the
contracts.
Stef