What is the meaning of this?

John Nilsson john at milsson.nu
Wed Feb 3 10:54:35 PST 2010


On Wed, Feb 3, 2010 at 5:14 PM, Joshua Bloch <jjb at google.com> wrote:

> >  Lambdas should not be forced to look like methods-of-objects, complete
> > with a self-referent 'this'.
> >
> This is the fundamental issue of this thread.  I don't see this is being
> forced to do the wrong thing.  I see it as the obvious correct thing. I
> believe we need a strong argument to do otherwise, because doing otherwise
> is an inconsistency. I see the "transparency" argument as weak. I'm not
> even
> quite sure what people mean by it, and I don't know what it buys me in the
> context of this effort.


Maybe it is an implementation issue? If the semantics of lambdas force them
to be objects doesn't this limit the runtime representation for no good
reason?


WRT to the argument that they should fit inside the current language
framework: Why can't they just be seen as anonymous methods?

In my world the step from
  public int method() { return 1; }
to
  public final #int() method = #int(){ return 1; }
is quite natural it you think of the former as syntactic sugar for the
latter.


BR,
John


More information about the lambda-dev mailing list