[Newbies] array literal - a misunderstanding?

Mathieu Suen mathk.sue at gmail.com
Sun Mar 4 21:55:19 UTC 2007


Is because the #(..) array is a literal build at compile time.
If you want a flat array use the {} syntax.
But this is specific to Squeak. You will not find it in VW for example.

Rather prefer the Array class>>#with:with:with:

	Math

On Mar 4, 2007, at 10:47 PM, Thomas Fischer wrote:

>
> #(1 2 (1 + 3))      "unexpected result: #(1 2 #(1 #+ 3)) "
>
> Why squeak means, that "(1 + 3)" is an array and not 4?



More information about the Beginners mailing list