Smalltalk mysticism

Doug Way dway at riskmetrics.com
Thu Jul 13 16:59:34 UTC 2000


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.
>
> http://www.smalltalkconsulting.com/html/metaClass.html

Hi John.  I was reading through your pages and ran across the unfinished MetaClass paper at
http://www.smalltalkconsulting.com/papers/otherOlderPapers/metaclassesPaper.html .

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 at 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 at mat.net, @riskmetrics.com
  RiskMetrics Group, Ann Arbor, MI
  http://www.riskmetrics.com






More information about the Squeak-dev mailing list