punctuation (was Re: Eliminating assignments and variablesynt ax (accessors))

Jarvis, Robert P. Jarvisb at timken.com
Thu Aug 5 12:31:01 UTC 1999


A statement terminator is required after all statements, even e.g. at the
end of a block or at some other point where it's obvious that no further
statements will appear.  A statement separator is required to separate
statements, but need not be included e.g. at the end of a block.  If #. was
used as a terminator instead of a separator, where today you might write

	myMethod
		self someCondition
			ifTrue: [ self doSomething ]
			ifFalse: [ self doSomethingElse ].
		^something

you'd have to write

	myMethod.
		self someCondition
			ifTrue: [ self doSomething. ]
			ifFalse: [ self doSomethingElse. ].
		^something.

You'd have to put in a bunch of extra periods, something I think we can do
without.

Bob Jarvis
The Timken Company

> -----Original Message-----
> From:	Travis Griggs [SMTP:tgriggs at keyww.com]
> Sent:	Wednesday, August 04, 1999 4:27 PM
> To:	squeak at cs.uiuc.edu
> Subject:	Re: punctuation (was Re: Eliminating assignments and
> variablesyntax  (accessors))
> 
> Alan Knight wrote:
> 
> > 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>
> 
> Pardon my ignorance. What's the difference between a statement terminator
> and a
> statement separator? It seems that if you terminate a statement, you
> separate
> it from the next one to come along.
> 
> I may just learn something out of what was just a whimsical rant intended
> for
> humor only. :)
> 
> --
> Travis Griggs (a.k.a. Lord of the Fries)
> Member, Fraven Skreiggs Software Collective
> Key Technology
> P-P-P-Penguin  Power!
> 





More information about the Squeak-dev mailing list