Recursive lambdas

Neal Gafter neal at gafter.com
Mon Feb 22 11:02:04 PST 2010


On Mon, Feb 22, 2010 at 8:34 AM, Alex Buckley <Alex.Buckley at sun.com> wrote:

> Neal Gafter wrote:
> > I thought that after you reassigned a variable, evaluating an expression
> > that is a reference to the variable should reflect the new value of the
> > variable.  That is true whether or not the variable is declared inside a
> > lambda, outside a lambda, or as a field.  Your response seems to suggest
> > some other semantics of variable assignment and variable reference.
>
> The self-reference to 'fac' could well justify a special binding for
> 'fac' within its initialization. The binding of 'fac' in the
> initialization of 'other' would work the usual way.
>

Assuming you're not joking, this sounds like a bad idea.


More information about the lambda-dev mailing list