4 ms·
When did you leave the object? There should be a check of the invariant as control leaves the object. At what moment does this happen. The F# people struggled
by Animats 4y ago
When did you leave the object? There should be a check of the invariant as control leaves the object. At what moment does this happen.
The F# people struggled with this. In proof systems, you check invariants at exit, and get to assume them true at entrance. So you need to be very clear about entrance and exit.
- layer8 4y agoWhenever you return from a public member function. You might wish for more flexibility, but it's a simple rule that's not difficult to work with.