31 Mar 2005 10:04
Re: Re: [groovy-dev] RE: Some enhanced methods for collection
On 31 Mar 2005, at 08:49, Dierk Koenig wrote: > toSet() reads nicer in expressions like > > println String.class.methods.name.toSet().sort() > > where 'as Set' reads nicer in declarations and single assignment like > > l = someotherlist as Set Or even Set l = someOtherList > How about having both? I think so too; if we have toArray() and toList() then having toSet() would make sense - so would using type coercion using variable declarations or the 'as' notation. James ------- http://radio.weblogs.com/0112098/
RSS Feed