a***@gmail.com
2013-08-08 05:24:46 UTC
Hi, I'm very much a smalltalk newbie and I have a question about metaclasses.
I'm still coming to grips with smalltalk terminology, especially since I do a lot of Ruby, so I see a lot of similarities, but I also see some things that confuse me because I'm probably thinking more in terms of Ruby.
As I understand, each class is an instance of a metaclass, am I correct there? And this is where Class methods would be defined, as opposed to instance methods on the class itself?
So my confusion is with objects that are instances of classes. Do objects also have a metaclass (similar to singleton or eigenclasses in Ruby?) If so, how do you define methods on an object's metaclass? Or are metaclasses are only the parent of a class? Is there any concept of eigenclasses on object instances like Ruby?
Thanks.
I'm still coming to grips with smalltalk terminology, especially since I do a lot of Ruby, so I see a lot of similarities, but I also see some things that confuse me because I'm probably thinking more in terms of Ruby.
As I understand, each class is an instance of a metaclass, am I correct there? And this is where Class methods would be defined, as opposed to instance methods on the class itself?
So my confusion is with objects that are instances of classes. Do objects also have a metaclass (similar to singleton or eigenclasses in Ruby?) If so, how do you define methods on an object's metaclass? Or are metaclasses are only the parent of a class? Is there any concept of eigenclasses on object instances like Ruby?
Thanks.