I wouldn't go with tie (if it even works?). I'd overload = to automatically clone the object on assignment.
Another approach is to use immutable objects. Such a class wouldn't provide a method for incrementing the object; it would provide a method that returns a new object with the higher value.
Both of these approaches add the unnecessary computational and memory overhead of creating clones in situations where they aren't needed.
In reply to Re^2: Action at a distance (updated)
by ikegami
in thread Action at a distance
by syphilis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |