Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Closure Vs Method

Gordon Ross

2010-03-15

Replies: Find Java Web Hosting

Author LoginPost Reply
(I think !) I understand the core difference between a groovy closure and a
normal Java class method.

If I'm writing a class, are there any pros/cons as to when to choose a
closure Vs a method ?

The main difference I can see, is that a method strongly types the
parameters & return type (so should be caught at compile time) whereas a
closure doesn't, as they don't resolve until run time.

GTG


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

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.