Tom Nichols | 15 May 14:46
Picon

Re: [groovy-dev] I'll give a Groovy presentation at the Jazoon'08

How do you call the 'each' method on iterable types?

Do you do this every time?
myList.each ({
  ...
})
That would get annoying quickly I think.

I always figure, if it has a curly brace after the object.call, then
it is automatically a method with parens omitted.  I learned that on
my first day of looking at Groovy, and since then I don't think I've
ever mistaken a method call for a property.  The reduction of symbols
definitely makes the code easier to read (and write, IMO).  I guess it
is all very subject to personal preference.

On Thu, May 15, 2008 at 7:50 AM, Aaron Digulla <digulla@...> wrote:
> Quoting Jochen Theodorou <blackdrag@...>:
>
>  because it's inconsistent. It mixes "builder.html" and "builder.p()".
> "builder.html" looks like a property access which it isn't.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane