[squeak-dev] Re: List syntax

Paolo Bonzini bonzini at gnu.org
Tue May 20 10:05:25 UTC 2008


> 'one',, 'two',, 'three' "an OrderedCollection('one' 'two' 'three')"
> 
> ($a -> 1),, ($b -> 2),, ($c -> 3) "a Dictionary($a->1 $b->2 $c->3 )"

Sort of...  what about a method that just does "^{ a. b. c }" but "a" 
can be a Collection?  You cannot rewrite it as "^a,, b,, c" and you need 
#with:with:with:.

My point is that braces are just a shortcut for Array>>#with:with:with: 
-- they have nothing to do with fancy polymorphism.

Paolo




More information about the Squeak-dev mailing list