[parenscript-devel] Lexical scoping question

Daniel Gackle danielgackle at gmail.com
Sat Jun 6 05:10:18 UTC 2009


I've played with the recent PS with lexical scoping, and it's grown on me.
My concerns about the readability of gensym'd suffixes are not turning out
to be as bad as I worried, and I'm noticing several benefits to the idea.
I'm hoping the recent batch of bugs we've reported can be fixed so we can
upgrade to the latest.

In the meantime, I'm trying to understand the intent behind this bit of
language redesign. Consider the following:

(ps (let ((a 123))
      (blah a))
    (alert a))

If this were really lexically scoped, the a in the alert form would be
undefined. But ps generates:

"var a = 123;
blah(a);
alert(a);"

Does this reflect what is intended? If so, is there a clear explanation of
just what "lexical scoping" is now offered by PS, i.e. what the rules are,
what we should expect, and what we should not expect?

Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20090605/c2c8fdcc/attachment.html>


More information about the parenscript-devel mailing list