Squeak (ST80) syntax

David M.Siegel dsiegel at mindspring.com
Wed Feb 16 12:33:20 UTC 2000



Dan Ingalls wrote:

>
> >Another question regarding syntax changes was raised by
> >Andres Valloud a long time ago. Here is a copy of his mail:
> >
> >Messages usually have the arguments last. Wouldn't it be
> >nice to have messages that could have arguments between a
> >phrase? Example:
> >
> >aBitStream next: 40 bits
>
> Such inclusions are often called "noise words", and several successful languages have used them.  I dislike them for two reasons that amount to the same thing:
>
>         1.  In an extensible language like Squeak, you are either
>         eliminating aspects of the extension (like "you must not
>         use 'bits' (and how many other words) as unary messages",
>         or, you are inviting chaos when someone does this.
>
>         2.  I just think that the presence of words that don't mean
>         anything, turns what should be mathematics into mush.
>         Another similar example to which I am even more opposed
>         is, when a variable C is bound to a collection with only one
>         element, why not (as a "convenience"), allow the user to
>         refer to that element by saying 'C' instead of 'C first'?

I like a terminating keyword for cases where it improves readability.
Seems to me, the problem is distinguishing a terminating keyword from
a unary message. What if we made the terminating keyword required?
That is, if it's part of the message, it's required.
In other words, a sample selector might be #arg1:arg2:terminator.





More information about the Squeak-dev mailing list