Implementing recursive lambda with MethodHandle
John Nilsson
john at milsson.nu
Tue Feb 23 11:06:17 PST 2010
On Tue, Feb 23, 2010 at 12:03 PM, Alex Blewitt <alex.blewitt at gmail.com>wrote:
> We could create a new keyword, like 'lambda', which acts as the self-lambda
> reference, but it seems a lot of work rather than just re-targeting 'this'
> to refer to the enclosing lambda scope, and allowing Outer.this to refer to
> the enclosing class instance.
>
Has it been decided that lambdas will be instances of Object? To me it seems
that a lambda is fundamentally different from an object which in it self
could warrant a different keyword than this. I'd vote for . (period) being
that keyword.
#int(int) lambda = .;
This could also be extended to a nice symetric syntax for lifting methods to
lambda-references.
#int(int) lambda = SomeClass.someStaticMethod;
or
#int(int) lambda = .someMethodInScope;
BR,
John
More information about the lambda-dev
mailing list