From: Juergen Strobel Date: 2006-05-26T00:07:59+09:00 Subject: Re: Zed and Luis drop the bomb on Ruby's poor performance On Thu, May 25, 2006 at 06:29:39AM +0900, Logan Capaldo wrote: > > I'm pretty sure CLOS is a super-set of the ruby object system. Only > thing I'm not sure of is Mixins and singleton methods, but I don't > imagine Mixins to be too hard to add if necessary. One could just > define a module, and then when one included it in a class just have a > macro go down the list of methods in the Module and define them for > the class (basically #append_features). Singleton methods are harder, > but one could probably do what is done in ruby, (construct a class on > the fly that inherits from an objects real class and change the > objects class to this new class.). We already get handling all the > inheritance stuff for free (and arrays and strings, numbers etc.). > From what I remember CLOS has distinct class and method hierarchies, and multi-dispatch of methods on all parameters. You can specialize functions depending on almost anything, not just class of the first parameter, which is the implicit receiver in message based OO systems. So, for singleton methods, it should suffice to specialize a generic function on the first paramter beeing some specific instance. CLOS classes do have a fixed and predeclared number of attributes called slots, and Ruby's dynamic attributes would have to be assigned to a slot holding a list/array/hash of attributes. Alas, my Lisp times are gone, short as they were in academics. But it's itching. J�rgen -- The box said it requires Windows 95 or better so I installed Linux