Hi --

On Fri, 30 Sep 2005, Bob Hutchison wrote:

> Where do you stop? Why inherit at all? How do you decide?
>
> [I sympathise with this, I've always preferred composition to inheritance. 
> Worse still, I went to the OOPSLA'87 (Orlando anyway, think it was 1987) 
> conference because I didn't 'get' OO and was hoping to figure it out. I 
> mentioned this to someone I was sitting beside and was treated to a lesson 
> over lunch (maybe breakfast, can't remember). This person was David Unger, 
> one of the key people responsible for self and the alternate OO model, 
> delegation/prototype, to Ruby's class-based OO model. So I was indoctrinated 
> early by one of the best :-) The "Treaty of Orlando" <http:// 
> citeseer.ist.psu.edu/stein89shared.html> came out of that conference.]

I sometimes wonder how class-based Ruby's model is.  Or maybe it's a
hybrid.  I don't know any purely prototyped languages, so I can't
compare directly, but I always think of a class in Ruby as a mechanism
for bootstrapping objects into object-space -- at which point the
objects have nothing further to do with the class, except that some
subset of the class's instance methods may continue to serve as a
subset of the methods of the object.  (But it never has to; that's
just a convenient default.)

It's the old "class != type in Ruby" thing.  I wonder whether Ruby's
potential to be regarded as a prototyped language simply has yet to be
fully explored.

   module Kernel
     undef :kind_of?, :is_a?  # maybe a few others
   end

would be an interesting experiment :-)


David

-- 
David A. Black
dblack / wobblini.net