jastrachan | 18 Nov 09:16 2004
Picon

Re: Feedack on Groovy

On 12 Nov 2004, at 21:51, Bill Odefey wrote:
> I know I am late for the meeting that is going on today, I would love 
> to see automatic conversions between lists and Java arrays.  This is a 
> really useful property of Jython, and I would love to see it in 
> Groovy.

How would you see this working? We've added mechanisms so that they 
have a similar look and feel. Do you want to be able to cast from one 
to the other?

foo = someArray
List l = (List) foo

?

I'd like to add a mechanisms for types to be able to decide how they 
coerce to other types; though I'd assume a cast (or the 'as' operator) 
would be used to do the coercsion. e.g.

List l = someArray as List

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


Gmane