Thanks for your suggestion.

If the argument type is Function and the parameter type is Closure, implicit
coerce will happen, thus the performance will be impacted somehow. Certainly
we can use native lambda to avoid the performance issue. 
In addition, Function accepts only one parameter, a bit limited for general
scenarios.

In short, Closure can not be replaced completely.

Cheers,
Daniel.Sun




-----
Apache Groovy committer 
Blog: http://blog.sunlan.me 
Twitter: @daniel_sun 

--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Reply via email to