You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Jochen Theodorou <bl...@gmx.org> on 2017/02/07 16:53:05 UTC

Re: Lambda vs. Closure


On 07.02.2017 16:44, Jesper Steen M�ller wrote:
[...]
> Generating faster/tighter code for lambdas (or even closures) can be
> implemented as a separate task, the two aren't really interconnected,
> since the Groovy closure is so versatile to begin with.

The problem is that Closure has delegates, owners and several other 
things, that make no sense for lambdas in the sense of Java. In other 
words: Closure does too much and is too heavy weight

bye Jochen

答复: Lambda vs. Closure

Posted by Daniel Sun <re...@hotmail.com>.
Hi Jochen,

Gotcha 😊
BTW, Generating the real lambda needs type information which is only available in the static compilation mode…so it’s impossible to have universal version of lambda if we want to implement the real lambda.


Cheers,
Daniel.Sun

发件人: Jochen Theodorou [via Groovy]<ma...@n5.nabble.com>
发送时间: 2017年2月8日 0:53
收件人: Daniel Sun<ma...@hotmail.com>
主题: Re: Lambda vs. Closure



On 07.02.2017 16:44, Jesper Steen Møller wrote:
[...]
> Generating faster/tighter code for lambdas (or even closures) can be
> implemented as a separate task, the two aren't really interconnected,
> since the Groovy closure is so versatile to begin with.

The problem is that Closure has delegates, owners and several other
things, that make no sense for lambdas in the sense of Java. In other
words: Closure does too much and is too heavy weight

bye Jochen


________________________________
If you reply to this email, your message will be added to the discussion below:
http://groovy.329449.n5.nabble.com/VOTE-Apache-Groovy-Roadmap-tp5738250p5738489.html
To unsubscribe from [VOTE] Apache Groovy Roadmap, click here<http://groovy.329449.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5738250&code=cmVhbGJsdWVzdW5AaG90bWFpbC5jb218NTczODI1MHwxMTQ2MjE4MjI1>.
NAML<http://groovy.329449.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://groovy.329449.n5.nabble.com/VOTE-Apache-Groovy-Roadmap-tp5738250p5738490.html
Sent from the Groovy Dev mailing list archive at Nabble.com.