Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
meta-class subclass relationships
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Rick DeNatale, post: 4584817"] In Smalltalk, where this stuff isn't so hidden. a metaclass is a class of a class. The main layout of classes and singleton classes as a parallel hierarchy with a cross-over and a loop at the top in Ruby is remarkably similar to that of Smalltalk. Of course Smalltalk also doesn't interpose module proxies as class-like things marked to be special, since it doesn't have modules. On the other hand Ruby doesn't have a Metaclass class like Smalltalk does. Smalltalk metaclasses have behavior mostly for interacting with the IDE. Sometimes I wish that Matz had put in a Metaclass class just so things wouldn't be so damned mysterious. IIRC the quote from Matz in the Pickaxe was that these things we are talking about "act just like" Smalltalk Metaclasses, but they aren't metaclasses, they are singleton classes of classes. I don't know if it's how Matz intended it, but I can interpret it as meaning that they aren't metaclasses just because there isn't a Metaclass class. In any event, I haven't found much interference from knowing how Smalltalk classes and metaclasses interact in understanding Ruby. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
meta-class subclass relationships
Top