brian.goetz at oracle.com
Mon Sep 24 07:28:04 PDT 2012
We decided to disallow this form for the time being, in part to simplify
the metafactory protocol and therefore increase the chance of
intrinsification of lambda capture sites.
On 9/24/2012 10:01 AM, Aleksey Shipilev wrote:
> Hi guys,
> What is our current stance on recursive lambdas? I.e. should this code
> considered to be correct?
> public static IntUnaryOperator fib =
> (n) -> (n < 2) ? 1 : fib.operate(n - 1) + fib.operate(n - 2);
> The current EDR spec says nothing about this, except for "Remove support
> for recursive lambdas" in the changelog, but both latest public b56 and
> the nightly binary builds of lambda/lambda forest in OpenJDK do accept
> this as the correct code.
> The reason I ask is that I keep bugging IDEA guys about their lambda
> support, fixing a bug here, there, and everywhere, as this helps people
> to start hacking on lambdas and provide the useful feedback:
> I think everyone realizes the spec is in flux, but it is important to
> understand what are we leaning towards.
More information about the lambda-libs-spec-observers