A different view of Smalltalk

Dwight Hughes dwighth at ipa.net
Tue Aug 17 20:43:32 UTC 1999


I must agree that this has a serious "cool!" factor. Thanks, Bob.

Bob Arning wrote:
> 
> Recent discussions started me thinking about different ways to display,
> understand and manipulate Smalltalk code. SyntaxMorph is an experiment
> that provides a graphical representation of Smalltalk syntax with popup
> menus to identify, examine and browse individual features. A SyntaxMorph
> view of a method can be created by selecting "BOBS SYNTAX" from the
> browser message list menu.
> 
> Questions to answer:
> 1. Can this provide useful information to beginning Smalltalkers?
> Intermediate? Advanced?

I would say that it could be very useful to beginning Smalltalkers --
especially those who just cannot quite get the hang of Smalltalk's
syntax due to previous brainwashing. More than that, it could be a nice
hook for non-Smalltalkers looking over one's shoulder. ;-)

For intermediate and advanced Smalltalkers, I don't think the visual
syntax display and grouping do much to enhance understanding, and may
even hinder understanding once a method is more than 5 or 6 lines long
-- but this is not meant to criticize your particular implementation of
it (which is very nice); I think the same thing about all visual
syntaxes or programming systems I've seen so far. HOWEVER, by making all
your visual groupings "mouse sensitive", you've opened everything up for
direct inspection -- that by itself is a very good thing.

> 2. Can this become a tool for writing code as well as reading it?

Possibly - almost certainly for teaching purposes. Code/expressions
could be represented as expression template boxes -- a toolbox with a
certain set of these templates (along with certain predefined objects
most likely) could be defined to fit an exercise or problem posed. By
plopping these boxes on a receiver object or expression (or on a blank
box contained in an expression) one could build up a program without
initial worries about typos and other minor screwups and confusions.
Likewise, one could reinforce interactive experimentation and
exploration by presenting a piece of code that does something
interesting along with a set of expressions/values that can be used to
change, extend, refine the original program by just plopping them into
appropriate places (one could even "key" templates to their proper
places, giving help when the student tries to put something where it
doesn't belong - or just color-key templates to positions to make it
painfully obvious).

> 3. Is it just a lot of pretty pictures?

Well, pretty pictures are nice too. But I certainly wouldn't consider it
"just" pretty pictures.

-- Dwight





More information about the Squeak-dev mailing list