Affects Version/s: None
Fix Version/s: Backlog
The general idea is to declare invariants inside a transaction and, when at commit time an invariant doesn't hold anymore, the transaction retries.
So it can both act as a kind of soft ensure or to specify actions that "partially commute".
Thus it would enable coarser refs.
See the attached file for quick prototype.
User code would looks like:
This means the commute will occur only if (@world :key) returns the same value in-transaction and at commit point.