Since commutativity is a core property of MRDTs, the library should help users verify that their merge options produce commutative results.
public enum MRDTCommutativityChecker {
public static func enable() {}
public static func disable() {}
}
When enabled, each conformance performs the merge in both directions and triggers an assertionFailure if the results differ. When disabled (the default), no checking happens and there is no runtime cost.
Since commutativity is a core property of MRDTs, the library should help users verify that their merge options produce commutative results.
When enabled, each conformance performs the merge in both directions and triggers an assertionFailure if the results differ. When disabled (the default), no checking happens and there is no runtime cost.