Jens Mueller:
> I don't like the "old" approach.
Why?
(It's the canonical way to solve the problem you have had. It is present in
Eiffel and C# and probably something similar is present in the DbC for Java.
But surely other solutions are possible.)
> Don't get your point here. You neither like the ghost fields (old) nor
> the debug {} approach as Andrei suggested?
I have written that answer of mine before reading Andrei answer.
> I mean after all the problem
> is not that important that one should bother too much.
The problem is important enough. In DbC it's very useful to have a
safe¬bugprone way to test if a method has changed the precedent state
correctly.
Bye,
bearophile