[parenscript-devel] Feature request: prefixed names

Daniel Gackle danielgackle at gmail.com
Thu Jun 21 04:15:15 UTC 2007


If you want to make sure that identifiers generated by Parenscript don't
clash with those in third-party Javascript, wouldn't you have to parse the
third-party Javascript?

Daniel

On 6/20/07, John Fremlin <john at fremlin.org> wrote:
>
> "Vladimir Sedach" <vsedach at gmail.com> writes:
> --text follows this line--
> > That sounds like a good idea, but I think it would be difficult to
> > implement correctly. The problem is that name mangling would have to
> > take place both when you declare the variables/functions, and when you
> > access them. So there would have to be some global state to keep track
> > of which identifiers have already been declared in ParenScript code so
> > that the corresponding name-mangling could take place when those
> > identifiers are accessed.
>
> Yes, I am well aware. If it didn't involve so much hard work, I would
> have done it already.
>
> However, this is another motivation for parenscript moving more
> towards being a proper Lisp to JavaScript compiler. Eventually, being
> able to run the same code in Lisp on the server as in JavaScript on
> the client would obviously be awesome.
>
> The definition tracking functionality would also be useful for
> code-compression (choosing short identifiers) as someone else
> suggested.
>
> Of course, I suppose constant folding (as you suggested) is the first
> step and would definitely be much more practical.
>
>
> [...]
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20070620/7e1704b2/attachment.html>


More information about the parenscript-devel mailing list