punctuation (was Re: Eliminating assignments and variable syntax (accessors))

Alan Knight alan at objectpeople.com
Wed Aug 4 20:06:08 UTC 1999


At 04:01 PM 8/3/99 -0700, Stephen Pope wrote:
>Travis Griggs wrote:
>
>> [...]
>>
>> Ahem. Please. Anything but the dot operator. Or come up with a different
>> statement terminator. Semicolon anyone? :)
>
>
>...just a reminder that "." in Smalltalk is a statement *separator*

<tangent>
.... and that is, I think, a bad thing.

This is a language which is, at least partly, intended to be easy for
novice programmers. The concept of statement separators is much more
complicated for a novice than statement terminators.

For that matter, why do we use "." at all. It's the smallest, hardest to
see character available, easily confused with ",", etc.  It also happens to
be the way sentences end in English and many other human languages. I think
an important property of Smalltalk is that much of its structure lends
itself to things that can easily be transliterated into natural language,
and ending statements with a period is part of that.

Of course, in natural language, *all* statements end with a period (or
other punctuation, but let's not go there). There's no rule that says you
can omit the period if it comes at the end of a paragraph.

Now, I wouldn't want to see code ending in 
       ].].].
so I'm willing to concede that "]" should also be treated as a statement
terminator, but I think on the whole we'd be better off with "." as a
terminator rather than a separator.
</tangent>





More information about the Squeak-dev mailing list