this should not refer to the lambda

Neal Gafter neal at gafter.com
Sun Feb 21 13:56:13 PST 2010


On Sun, Feb 21, 2010 at 12:29 PM, Alex Blewitt <alex.blewitt at gmail.com> wrote:
> I don't recall seing a suggestion of how to implement a recursive
> lambda (which is 'rare' but not 'extinct') without breaking the
> illegal forward reference issue that I mentioned previously. I could
> have missed something; can you forward me the link of where that is
> done?

Sure: http://mail.openjdk.java.net/pipermail/lambda-dev/2010-January/000432.html

Just to be clear, the one minor adjustment to the definite assignment
rules that is needed if you want to allow, for example

#int(int) fac = #(int x)(x <= 1 ? 1 : x * fac.(x-1));

is trivial to specify (when the right-hand-side of a variable
initialization is a lambda expression, the variable is definitely
assigned before the lambda expression) and trivial to implement, and
has been implemented in BGGA.  This option has the advantage that it
avoids the need to specify the lambda's result type.

> > The technical arguments for
> > transparency of semantics for lambdas have been made in many contexts over
> > the years.  A good place to start is with Steele's "Lambda the Ultimate..."
> > series of papers.
> And yet, they've not been made/summarised here; ...

Some of them have, actually, but rather than continuing to predigest
the information for you, perhaps you would care to take a stab at it.


More information about the lambda-dev mailing list