Implementing recursive lambda with MethodHandle

Peter Levart peter.levart at marand.si
Tue Feb 23 04:27:27 PST 2010


On Tuesday 23 February 2010 12:49:58 Alex Blewitt wrote:
> On 23 Feb 2010, at 11:22, <David.Moss at ubs.com> wrote:
> 
> > But,
> > Retargeting 'this' -1
> > 
> > Because I think it is a really bad idea.
> 
> There are others that share your opinion on this list. :-) 
> 
> But if we've blown transparency with the lack of (non-final) variable capture, returns/continue/break acting differently from within a lambda than outside,

These are all restrictions that make such code illegal (doesn't compile) and not, as you claim, "acting differently"...

> there doesn't appear to be any argument against having 'this' as meaning something different inside a scope as well, other than personal expectations.

Now this is something that will compile, one way or another. It's just semantics of "this" that are questioned.

What's the difference? A big one. Restrictions can be lifted at a later time without backwards compatibility breakage, while the semantics of "this" can never change once defined.

> 
> Lastly, we still can't use 'this' transparently in the 0.1.5 spec, since 'this' is explicitly disallowed at the current time.
> 

Only in expression lambdas or return statements of statement lambdas, If I remember correctly.


Regards, Peter


More information about the lambda-dev mailing list