Any other thoughts?
Well I've a few stories (as usual) to tell about metaclasses. (No pretty pictures) Like the picture Craig! Will link to it later this week.
http://www.smalltalkconsulting.com/html/metaClass.html
http://www.smalltalkconsulting.com/papers/tipsAndThoughts/metaClassesBiteBac k.html
-- =========================================================================== John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com =========================================================================== Custom Macintosh programming & various Smalltalk dialects PGP Key: DSS/Diff/46FC3BE6 Fingerprint=B22F 7D67 92B7 5D52 72D7 E94A EE69 2D21 46FC 3BE6 ===========================================================================
John M McIntosh wrote:
Any other thoughts?
Well I've a few stories (as usual) to tell about metaclasses. (No pretty pictures) Like the picture Craig! Will link to it later this week.
Hi John. I was reading through your pages and ran across the unfinished MetaClass paper at http://www.smalltalkconsulting.com/papers/otherOlderPapers/metaclassesPaper.... .
I thought your diagram there was one of the better ones that I've seen for clearly explaining the relationships. (I noticed that Ralph's page had a broken link to what I assume was a diagram. Any other good diagrams out there?)
Anyway, a few comments on your diagram, which might make it even better: :-)
- It would be great to have a key explaining what the dotted arrows versus solid arrows represent, to make more beginner-friendly. Basically, the dotted arrows represent what happens when a "class" message is sent to an entity, while the solid arrows represent what happens when a "superclass" message is sent. (Or in layman's terms, the dotted arrows represent a, um, "is defined by" relationship, while the solid arrows represent an "is a" (inheritance) relationship. Thus, since all solid arrows lead to Object, everything really "is a" object. :-) )
- For your concrete example, instead of using Menu, you could use something like Point, and then draw another box to the left of Point containing the text "2@3" (an instance of Point), with a dotted line pointing to the Point box. This just makes it extra clear what the dotted line relationship means.
(Plus a couple of quibbles...)
- The dotted arrow going from Menu class to Menu is backwards, I assume.
- The dotted arrow going down from MetaClass Class is redundant, since there's already the two-way arrow between MetaClass and MetaClass Class.
(Ah, what the heck, I'll post this to the list too, since the diagram is worth a look.)
- Doug Way dway@mat.net, @riskmetrics.com RiskMetrics Group, Ann Arbor, MI http://www.riskmetrics.com
squeak-dev@lists.squeakfoundation.org