return-from-lambda viewed as dangerous, good alternatives

Neal Gafter neal at gafter.com
Fri Jan 8 09:24:04 PST 2010


On Thu, Jan 7, 2010 at 6:37 PM, Joshua Bloch <jjb at google.com> wrote:
> I don't think anyone is trying to redefine return. In Java return has always
> meant "return this value (or no value)" from the invocation of this method.
> I think that must be true whether the method is a lambda or or an ordinary
> method. I just don't see a problem here.
>
> I don't think this is an implementation consideration; I think it's
> fundamental. We're considering adding function types to the language, which
> define functions (AKA methods).

If we continue to misinform people and tell them that lambdas are
methods in the context of this language feature, then it is true that
the language should reflect that correspondence.  However, I believe
it will be natural for programmers to become familiar with a language
feature that is not grown out of this misinformation.


More information about the lambda-dev mailing list