I believe this is a fairly common pattern for object oriented design.
My experience suggests the opposite. Having an object that you're holding a reference to automagically morph into a different object when a method gets called somewhere else is an anti-pattern. It can lead to situations that are wickedly hard to debug, particularly when you pick up the code six months later, and have forgotten just how clever you were and where.
In reply to Re: An object replacing itself
by dws
in thread An object replacing itself
by ryantate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |