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.

Activity

Show:

Ryan Guill 10 November 2015 at 03:37

Adam Cameron 8 April 2015 at 08:07

This is definitely wrong. They ought to use closure.

Fixed

Details

Assignee

Reporter

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Fix versions

Affects versions

Priority

Created 8 April 2015 at 00:59
Updated 11 November 2015 at 08:25
Resolved 10 November 2015 at 16:27