From: dblack@... Date: 2007-06-26T20:23:55+09:00 Subject: Re: Error in ancestor? Hi -- On Tue, 26 Jun 2007, Robert Dober wrote: > On 6/25/07, dblack@wobblini.net wrote: > >> I guess the ideal terminology would encompass both the similarities >> and the differences. Clearly there's some very strong identity >> between: >> >> class << C # where C is a class >> >> and >> >> class << some_non_class_object >> >> and it makes sense to treat them at least up to a point as the same >> thing. (Or *past* a point?) But I don't have the perfect terminology >> to hand by any means. > Forgive my ignorance, but are they not the same already? > > In other words given three arbitrary objects of which one happens to be a > class: > o0, o1, o2 = Class.new, String.new, Object.new > s0, s1, s2 = [o0, o1, o2].map{|o| class < > would there be any conceptional differences between s0 and si i>0, > that are not there between s1 and s2? > > Or still in other words, and sorry for coming back to the original > topic *again*, is it not outside of the singleton class implementation > that we have to look for unification too? The thing is, there's one big difference that's not just a matter of implementation: singleton classes of Class objects are the only ones that can actually be called by more than one object (the class, plus its descendants). So that calls into question the appropriateness of "singleton" as a way of describing them. I'm not a fan of "metaclass" -- as Jim Weirich (if I recall correctly) said, the only real metaclass in Ruby, i.e., class of classes, is Class. David -- * Books: RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242) RUBY FOR RAILS (http://www.manning.com/black) * Ruby/Rails training & consulting: Ruby Power and Light, LLC (http://www.rubypal.com)