Local functions

Rémi Forax forax at univ-mlv.fr
Wed Feb 10 13:28:23 PST 2010


Le 10/02/2010 20:26, Alex Buckley a écrit :

> I'm glad you are also thinking about the limits of lambdas. I do not
> relish developers continually having to choose between putting code in a
> nearby method, a static nested SAM class, an anon.inner SAM class, or a
> lambda. Things used to be so simple...
>    

Recursive lambda is a corner case,
I even think that a lot developers will never
write a recursive lambda.
So writing a method for this peculiar case will not
prevent me to sleep.

> Setting up a lambda expression as above is characterized as the
> "Closure/Stored message invokability principle" in
> http://blogs.oracle.com/ohrstrom/2009/08/using_methodhandles_to_reconci.html:
>
> "A method reference like: MyApp#saveState() will be transformed into the
> closure { MyApp m ==>  m.saveState() }  this is identical to the stored
> message (aka MethodHandle) #MyApp.saveState. "
>
> Method references are in scope for this project, though I tend to think
> that relying on ordinary methods ignores Doug's plea for clear
> demarcation of (and restrictions on) code that experiences parallel
> execution.
>
> Alex
>    

Rémi



More information about the lambda-dev mailing list