3 ms·
Subclassing and returning a new object instead of updating the existing one.
by solidsnack9000 9y ago
Subclassing and returning a new object instead of updating the existing one.
- skybrian 9y agoSometimes that works, but if there is more than one possible next state, you need to return a supertype and you're back where you started.