[squeak-dev] Block argument syntax

Frank Shearar frank.shearar at gmail.com
Fri Mar 1 10:47:10 UTC 2013


I was rather surprised to learn that the following is valid syntax:

    [ : x | x + 1]

(Note the space before the argument name.)

In fact, this is too:

    [ : "This is a really long comment in a very, very strange place.
It makes it very hard to see that the : before this comment turns the
token after this comment into a block argument." x | x + 1]

Is that intentional? Does ANSI Smalltalk define it?

frank


More information about the Squeak-dev mailing list