Implementing recursive lambda with MethodHandle
Joshua Bloch
jjb at google.com
Tue Feb 23 11:19:50 PST 2010
John,
On Tue, Feb 23, 2010 at 11:06 AM, John Nilsson <john at milsson.nu> wrote:
> 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
I respectfully disagree. Java already has a bipartite type system (with
object rerference types and primitive types). The *last* thing we should do
is to make it tripartite. People already complain about the
primitive/object distinction. We must avoid adding significant new
complexity to an already complex language. Java's type system is among the
most delicate and complex parts of the language. Anything we add has to
interoperate seamlessly and predictably with what's already there/
Josh
More information about the lambda-dev
mailing list