From: Rick DeNatale Date: 2010-01-06T08:00:52+09:00 Subject: [ruby-core:27433] Re: [Feature #1082] add Object#singleton_class method On Tue, Jan 5, 2010 at 5:25 PM, Ammar Ali wrote: > Issue #1082 has been updated by Ammar Ali. > > > Suggesting new terms might be completely unwelcome, but... > > The distinction between a "regular" class and a singleton/eigen/whatever class appears similar to the distinction between phonetic �and phonemic in phonology. Some shorten these terms and broaden their meaning; "emic" (loosley meaning below the surface) and "etic" (loosely meaning on the surface). Would emic-class make sense to others? > > Also from linguistics, the prefix "allo-" generally means "differing from the normal"... so I wonder if "alloclass" is a good possible name. In the edition of the Pickaxe corresponding to Ruby 1.8. Dave Thomas used the term Virtual class, which never seems to get mentioned in these discussions. Not that I think that that's the right term either, in fact, it's really the opposite of the characteristic which I think the 'classes' which provide singleton methods, and the 'classes' which provide class methods (which IMHO really aren't singleton methods because they apply to subclasses as well) share. There's an old CS joke. If it's there and you can see it, it's real, If it's not there and you can see it, it's virtual If it's there and you can't see it, it's transparent, If it's not there and you can't see it it's gone. I would suggest transparent_class for singleton classes whether they are singleton classes of regular objects (which really do provide methods ONLY for one object) or 'singleton' classes of Class objects. The key aspect is that the Ruby implementation does its best to hide these from the Ruby programmer. Or perhaps, since in a kind of heisenberg effect, providing an official method to make them visible means that they wouldn't really be totally transparent, perhaps hidden_class, and for transparent/hidden classes which are the (meta?)class of a class, a hiddden_superclass method, so that String.hidden_class.hidden_superclass would return Object.hidden_class -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale