Towards an ST-72 example

Helge Horch Helge.Horch at munich.netsurf.de
Tue Nov 23 19:36:35 UTC 1999


At 14:39 23.11.99 +0100, Marcel Weiher wrote:
>Could you explain just a little what those interesting improvements
>to ST-72 were (presumably to do with the cleaner class interface)?

PMFJI - I don't know if these were the improvements Alan had in mind, but
from reading the SIGSMALL paper and playing with the Alto ALLDEFS, I think
I might see one difference.

In Rosetta(R) Smalltalk, it looks like the underlying system did the token
stream parsing. Instead of the class being the active parser (as in the
st72 we have), the system consulted a dictionary of the receiver class for
recognizable token sequences. The longest matching sequence won, and its
arguments were bound automagically.

These message patterns would be of the form ("..." designating the receiver
placeholder)

   ... move to (newl) (newh)

or

   ... flash (n) times

for class Window. Similar to st72, the argument placeholders could specify
"unevaluated" by prefixing "@"

   ... 's (@code)

(The second form slightly reminds me of keyword arguments. Our st72 would
have to skip additional tokens explicitly, I guess.)

Also, you could extend that dictionary at runtime, like this:

   Window answer @( flash (n) times ) by @( do n (self unframe frame) )

or

   Object answer @( 's (@code) ) by @( reply code eval )

HTH,
Helge





More information about the Squeak-dev mailing list