Newbie question

Ramon Leon ramon.leon at allresnet.com
Mon Jul 23 17:59:52 UTC 2007


> The period is really a separator and not an operator. Since 
> period is also used as a decimal point, one needs to watch 
> out for gotchas like:
>  {1.2.3} = an array with two elements 1.2 and 3
>  {1 . 2 . 3} = an array with three elements 1, 2 and 3
> 
> I wonder how period came to be used as a separator within 
> braces in Smalltalk instead of comma or semicolon.
> 
> Regards .. Subbu

This isn't common to all Smalltalks, it's a Squeak idiom as far as I know,
though others may have some form of literal array as well.  It also makes
perfect sense to use a period, since the period is "the" statement seperator
for expressions in Smalltalk.

Ramon Leon




More information about the Squeak-dev mailing list