From: Andrew Choi Date: 2010-01-06T10:16:56+09:00 Subject: [ruby-core:27435] Re: [Feature #1082] add Object#singleton_class method
unsubscribe - Andrew Choi (achoi@hanmail.net)




---------[ ���� ���� ���� ]----------
���� : [ruby-core:27433] Re: [Feature #1082] add Object#singleton_class method
���� : 2010�� 1�� 06�� ������, ���� 08�� 00�� 52�� +0900
������ : Rick DeNatale <rick.denatale@gmail.com>
������ : ruby-core@ruby-lang.org

On Tue, Jan 5, 2010 at 5:25 PM, Ammar Ali <redmine@ruby-lang.org> 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 �nd 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




�������� ������