Eigenclass Considered... Considered! #
Matz is warming up to the term eigenclass, the People’s slang for (class << self; self; end)
. From [ruby-talk:231992]:
In my mindset, two candidates have survived. singleton_class (or singletonclass), which can easily be confused with a class in the singleton design pattern. And eigenclass, which is unfamiliar for most people.
Does anyone know if Perl 6 folks still use it?
Danno
While eigenclass is way cooler, singleton class makes more sense now that you have to do some funky, funky stuff to make a new instance based off of an existing object.
Tesseract
Perhaps it’s actually a good thing to use an unfamiliar term for what is probably, to most people learning Ruby, an unfamiliar concept. That way people won’t draw unwarranted conclusions about the concept from the word itself.
Besides, a simple explanation that “eigen” == “its own” should make the choice of terminology perfectly clear to people who grok the concept.
evan
Danno, I really want the instantiating an eigenclass to get defunkified.
I like the term ‘shadow class’ but so far that seems unpopular. But it shadows the real class…
josh
What is wrong with the term “metaclass”? That has been standard in OOP terminology since the 1980s.
flgr
Class is a meta class. It’s the class of classes. The word is already used for that.
flgr
Class is a meta class. It’s the class of classes. The word is already used for that.
flgr
Class is a meta class. It’s the class of classes. The word is already used for that.
shadytrees
Before, we only confused the OOP newbies. Now, we can also confuse the OOP experts.
binary42
Danno, actually, a while ago I found a much simpler way to do prototyped objects in Ruby:
Works well enough for me on 1.8.5 with no evil.rb in sight.
101010
err….
Should try to run things before not after.
2a
hmm. last correction: foo should be ans.
52
I guess that’s what you get for writing code in public ;-)
doki_pen
I think using singleton is a mistake.
Daniel Berger
Damn, I guess this means my idea for using “Highlander” is out. Because, you know, there can be only one.
quac(k)lass
why is there a horse on your duck?