I’ve come up with a simple law called Law of Reversability of Attributes. It’s based on the physics law of a similar name. Basically what the law means is that the inverse of a transformation should result in a return to the original state.
The Law of Reversibility of Attributes is defined as:
For a given state of an object; when a attribute’s value is changed, the inverse of that value, when applied to that attribute, will result in the object returning to its original state.
I say “attribute” rather than “property” to encompass methods that imply setting of attributes. So, for example
means myObject will be in the same state after the second line of code than it was before the first line of code.