We're updating the issue view to help you get more done. 

Lambdas are not closures

Description

I know there has been previous discussions regarding this, but please reconsider and make lambdas closures as well. There are many use cases for lambda closures and few use cases where you would not want a function to close over its environment. I also feel that it is going to cause quite a bit of confusion when lambdas are described as a different syntax for anonymous functions but do not work the same way. This has the opportunity to cause some very subtle and hard to diagnose bugs.

JS lambdas use closure (and I believe groovy and java do as well). I believe this will be surprising for devs coming from other languages.

If you do not accept this proposal, please make sure that the differences are pointed out and documented as many places as possible.

Status

Assignee

Michael Offner

Reporter

Ryan Guill

Labels

Fix versions

Affects versions

5.0.0.96

Priority

Critical