transparent lambda

Neal Gafter neal at gafter.com
Tue Dec 29 14:21:04 PST 2009


On Tue, Dec 29, 2009 at 2:00 PM, Stefan Schulz <schulz at the-loom.de> wrote:

> I'm not sure about the namespace issue, though. What would this code do? Or
> is transparency limited here?
>
> void foo() {
>  foo: {
>    #void() bar = #() bar: {
>      break foo;
>    }
>    bar();
>  }
> }
>

The syntax for a named lambda we've been discussing is

*#name(args) { statements }*

in other words, the controlled statement must be a block statement.

If we use labelled break for returning early from a lambda, I would expect
it to be illegal to use a lambda label with the same name as a label in the
enclosing method.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091229/324d16b9/attachment.html 


More information about the closures-dev mailing list