symbol, value and 3.9

Lukas Renggli renggli at gmail.com
Wed Dec 6 19:04:20 UTC 2006


> How should the following (new for 3.9 ) be used?:

   (1 to: 10) collect: #squared

is the same as

   (1 to: 10) collect: [ :each | each squared ]

This can be quite convenient. Don't think this is a speed
optimization, because there is no block-activation. Strangely the line
with the block is slightly faster in 3.9.

Cheers,
Lukas



>
>
>
> Symbol>>#value:
>
>
>
> Thanks,
>
>
>
> Julian
>
>
>
>


-- 
Lukas Renggli
http://www.lukas-renggli.ch



More information about the Squeak-dev mailing list