On Wednesday, 18 January 2017 at 21:57:42 UTC, Andrei
On 1/18/17 5:29 PM, Mark wrote:
I see. Is there a way to call invariant() of a class/struct
That would obviate the need for a particular predicate (copy
state, run the setter, check if invariants are satisfied and
previous state if they aren't).
It seems painfully obvious the right way is a guarded
assignment and anything else would be a more or less painful
workaround. -- Andrei
I agree. I'm just a bit unsettled by the slight code duplication
that would ensue.