neal at gafter.com
Wed Dec 30 08:38:20 PST 2009
On Wed, Dec 30, 2009 at 8:30 AM, Rémi Forax <forax at univ-mlv.fr> wrote:
> Yes, I see a lambda as an anonymous function and not as an abstraction
> over a statement or an expression.
> That's why 'return' returns from the lambda and not from the function.
> In my opinion, lambda are more like anonymous class but for function.
> So like you use Outer.this in an inner class to access to the enclosing
> you should use f.return to return from a named function in an anonymous
That's certainly a consistent position, but it's not as useful. Writing
methods that act as control structures would require callers to reorganize
their code to use these control APIs.
If you're going to bother to support nonlocal transfers, you might as well
make the lambdas transparent and get the full benefits.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the closures-dev