[parenscript-devel] Lexical scoping with LAMBDA
Vladimir Sedach
vsedach at gmail.com
Tue Sep 13 17:57:11 UTC 2011
Just pushed a fix for this bug. Thanks for the bug report!
Vladimir
On Tue, Sep 6, 2011 at 5:48 PM, <sblist at me.com> wrote:
> It appears as though there might be a gap in the lexical scoping
> implementation in the compiler:
>
> (ps (lambda (x)
> (let ((x 1))
> (foo x))
> (incf x)))
> =>
> "function (x) {
> var x = 1;
> foo(x);
> return ++x;
> };"
>
> vs.
>
> (ps (let ((x 10))
> (let ((x 1))
> (foo x))
> (incf x)))
>
> "var x = 10;
> var x33 = 1;
> foo(x33);
> ++x;"
>
> Although function parameters have their own lexical bindings,
> the environment still needs to be informed of those bindings
> so that LET forms in the function body can rename any conflicts.
>
> Scott
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
More information about the parenscript-devel
mailing list