
21 Oct
2009
21 Oct
'09
9:26 p.m.
Scott McMurray wrote:
2009/10/21 Ireneusz Szpilewski <irek@szpilewski.opole.pl>:
Scott McMurray wrote:
How do you implement a heart transplant when you inherit from your heart, rather than contain it?
Before transplant:
class Me: private MyHeart { };
After transplant:
class Me: private SombodyElsesHeart { };
And how exactly are you supposed to make that change at runtime?
What do you suggest?
heart as a member of Me? Before: class Me { MyHeart heart; }; After: class Me { SomebodyElsesHeart heart; } It can't be done at runtime either.
(That's not a heart transplant; That's growing a clone body around the new heart.)
This is exactly how transplant is seen from the new heart point of view ;-)
Ireneusz Szpilewski