From: Peter Suk Date: 2005-04-24T02:12:59+09:00 Subject: Re: Truth, Void, Smalltalk, Lisp, and Ruby (was: Re: Ilias is Crazy -- a plea) On Apr 23, 2005, at 11:13 AM, Christian Neukirchen wrote: > Peter Suk writes: > >> On Apr 23, 2005, at 9:24 AM, Christian Neukirchen wrote: >>> And: You can set the >>> superclass to be nil, but that makes certain methods not look at the >>> superclass, not look at nil. >> >> That's really an implementation detail -- people doing conditional >> logic where polymorphism would also do. I just inspected >> UndefinedObject in Squeak 3.7 and used the inspector window to set its >> superclass to Class. Now we can reimplement methods like >> allSuperclasses so that they are polymorphic. (Well, you have to >> change a bunch of other assumptions in the system too. Browsers will >> now throw exceptions on certain operations. But things still *kinda* >> work. :) > > Ok, you are right. Actually, you don't have to do the thing with changing UndefinedObject's superclass either. You can put in the polymorphism "Duck-Typing" style, so UndefinedObject "Duck-Types" to Class. >> I know there is a doesNotUndertand equivalent, so Ruby has forwarding >> proxies. Is there an equivalent of become: ? > > Not yet, but I'd love that. I will put that into Alumina-VM's image just for you, Christian! --Peter -- There's neither heaven nor hell, save what we grant ourselves. There's neither fairness nor justice, save what we grant each other.