groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject 答复: Lambda vs. Closure
Date Tue, 07 Feb 2017 17:00:51 GMT
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]<mailto:ml-node+s329449n5738489h17@n5.nabble.com>
发送时间: 2017年2月8日 0:53
收件人: Daniel Sun<mailto:realbluesun@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.
Mime
View raw message