[parenscript-devel] New patch that adds real lexical scoping and maybe breaks your code

Vladimir Sedach vsedach at gmail.com
Sun May 3 21:40:32 UTC 2009


I just pushed a patch into the repository that may break existing
code. Here is the patch description:

    Implemented LET and LET* by variable renaming, which provides the
    correct scoping semantics, and simplifies both the producing and the
    produced code.

    Removed the "." and "[]" name-mangling conventions from
    symbol-to-js-string. Any code that uses symbols such as "foo.bar[baz]"
    will now issue a warning, and needs to be rewritten to use standard
    Lisp accessors. This is needed for variable renaming to work, and is
    an extension of the patch that eliminated the ".method" method-calling

    Thanks to Daniel Gackle and Dough Hoyte for opening my eyes to this
    technique, which was right in front of me all along.

This is a win-win situation for everyone involved (yes, even if it
breaks your code, think of it as an opportunity for refactoring).

With this patch Parenscript is finally rid of the evil symbol-abuse
conventions, which IMO is the only thing from the original design of
Parenscript that can in retrospect be called a mistake.

Let me know what you guys think.

Thank you,

More information about the parenscript-devel mailing list