Pavel Minaev int19h at
Wed Jul 7 12:41:14 PDT 2010

On Wed, Jul 7, 2010 at 12:26 PM, Neal Gafter <neal at> wrote:
> On Wed, Jul 7, 2010 at 12:21 PM, Mikael Grev <grev at> wrote:
>> Most developers seem to think that a lambda body is comparable to a SAM/AIC
>> implementation body, which is a method.
> Most Java developers have not used lambdas in Java.

Nonetheless, the existence of SAM conversion, and the immediate
usability of lambdas in all contexts where anonymous inner classes
were previously used, makes a clear case for lambdas as syntactic
sugar for inner classes for many (I'd argue most, but that is
subjective) Java developers.

> Those who have used them in other languages rarely think of them as a method body.

And again I have to disagree. Most C# programmers, for one, would
think of them in precisely that way, and they alone make up a huge
part of "those who have used them in other languages", given the
popularity of C#. Another very huge - probably even bigger, actually -
group with "foreign lambda background" would be JavaScript developers,
and they also tend to think of a lambda as some kind of function.

Indeed, can you give an example of a popular language which 1) has
explicit "return", 2) has lambdas, and either 3) does not allow for
"return" in a lambda, or 4) allows for it, but only in the meaning of
non-local return? The only one I can think of right off the bat is
Smalltalk, and also Ruby to some extent (as it has different kinds of
lambdas, with both local and non-local returns).

More information about the lambda-dev mailing list