From: Ilias Lazaridis Date: 2005-05-05T06:59:48+09:00 Subject: Re: [RCR] Object#inside_metaclass? David A. Black wrote: > Hi -- On Thu, 5 May 2005, Mark Hubbart wrote: [...] >> All the more reason to give them a different name... At this point, >> I care very little what they're called; virtual class, idioclass, >> own class, whatever. Just give us a nice, non-overlapping name to >> call them by. I guess singleton class will have to do until then, >> though... > > Actually one would not want a completely separate name, for the > reason that the almost-metaclasses really are singleton classes. > Anything generated by: > > class << self; self; end > > is a singleton class. no, it is not. anything generated by (class << self; self; end) has not _any_ instance. Thus it is not a singleton class (which has _one_ instance) - It is a hidden class, a virtual class, or simply an "x-class". x stands for "anything" / "mystery". x stands for "exclusive" (to _one_ object) object.xclass. "singleton class" => x class http://lazaridis.com/case/lang/ruby/index.html > If 'self' is a Class object, then the > resulting singleton class is also an almost-metaclass > (parametaclass?!). But it doesn't cease to be a singleton class. almost-metaclasses => meta-objects or xclass of class-obj - The first step to "break" out of the confusion is to release to term "singleton-class", which has a specific meaning. .. -- http://lazaridis.com