jastrachan | 18 Nov 15:14 2004
Picon

Re: Feedack on Groovy


On 18 Nov 2004, at 14:07, Dierk Koenig wrote:

> Hi :-)
>
> Explicit coercion surely has some advantages, but
> for my taste it doesn't really _look_ great:
>
> // ok, but looks like VB
> java.utilCollections.sort([1,2,3] as List)
>
> // Does this look nice? How to parse this?
> [1,2,3] as List.sort()
> [1,2,3] as List.each{...}

How about just

[1, 2, 3].sort()
[1, 2, 3].each { ... }

(which works today).

James
-------
http://radio.weblogs.com/0112098/


Gmane