Thank you everyone. Yes, the subject is a bit misleading ;) I'll give you my exact use case to make things clearly…
I'm cleaning up the globals ActiveWorld and World. There are methods such as Morph>>world that sometimes return one of the above, or nil. As part of the cleanup, I want a NullWorld that is indeed polymorphic with WorldMorph. However, I don't want to change too much at once because it's too easy to freeze the image. So I want to temporarily implement NullWorld>>#ifNil:ifNotNil: so that I can plug in the new object, without breaking all the existing code, so I can switch back to nil if I get in trouble. When it's working, I'll start to remove all the #ifNil:ifNotNil: sends as a 2nd phase. In light of this, what's the best way to proceed? ----- Cheers, Sean -- View this message in context: http://forum.world.st/Null-Object-Pattern-tp4738574p4738906.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
