[   ^ to index...   |   <-- previous   ]

Aside on ugliness and confusion, continued

Are you confused by metaclasses?

If you are, then join the crowd. Metaclasses are one of the few ugly parts of Smalltalk. It's quite useful to be able to inspect and dynamically modify the classes of objects, but the conceptual weirdness of using classes and metaclasses is a high price to pay.

One solution is to remove the distinction between objects and classes, and create objects simply by copying other objects. In this scenario, you would create a new integer by cloning an old integer, and perhaps changing the copy (including adding new methods to that copy). The metaclass problem goes away, because objects have a "parent" instead of a class, and there is no rule that says every parent must have a parent. At the same time, you retain the power to treat parents as regular objects.

Languages that use this approach are called "prototype-based" object-oriented languages. Self (developed by Dave Ungar's group at Stanford, and then Sun) and Cecil (developed here at UW, by Chambers et al.) are two such languages.

Squeak key command reference

Squeak key commands are invoked using a modifier key plus a regular letter (possibly a capital letter). The modifier key, which I will refer to as "mod", is ALT under Windows; on Macintosh, it is COMMAND.

You can get the command key list by bringing up the Squeak menu and clicking "help..." -> "command key help", but I had some empty space on these handouts so here's a quick reference for the commands I use frequently (the ones at the top are the ones I do most often):

Evaluation/environment
doIt mod-d
printIt mod-p
save/accept mod-s
browse it mod-b
inspect it mod-i
 
Text editing
delete previous word mod-w
cut mod-x
copy mod-c
paste mod-v
find a string mod-f
find next mod-g
undo mod-z
set font mod-k

Keunwoo Lee
Last modified: Thu May 10 00:45:55 PDT 2001