From: Lionel Thiry Date: 2005-08-18T07:21:15+09:00 Subject: Re: Prototype-based / Ruby question zimba.tm@gmail.com a �crit : > I just stumbled across this page[1] on RubyGarden. The writer tells > that prototye-languages languages are great and that Ruby is not part > of them. > > As I understand the definition, prototype based languages don't > instanciate objects from a class, but rather clone an existing model > object. Ruby's classes are objects. > > So which is first, the Class or the Object ? > > It makes me think of a french sentence which says : From the chicken > and the Egg, which was first ? (disregarding the theory of evolution) > > Cheers, > ... zimba As far as I could understand it, the most practical advantage of prototype based OO language is their ability for one object to dynamically rewrap its inheritence. Oh, in protope based language, inheritence is named delegation. But it is same in the sense that both affect the lookup. Is it possible to do self.class = OtherObject ? I don't know, I haven't tested it yet, but I guess it is "no". Is it possible to dynamically un-include and include Module in a class? Perhaps, I'm not sure. But if it is, then Ruby is not that much less than a prototyped language after all. Or I just don't get it about prototype based language. I must tell that I'm not even sure to understand what typing could be in ruby, and I don't even tell about duck typing. -- Lionel Thiry Personal web site: http://users.skynet.be/lthiry/