[parenscript-devel] Feature request: prefixed names
reddaly at gmail.com
Thu Jun 21 03:33:01 UTC 2007
On 6/20/07, Vladimir Sedach <vsedach at gmail.com> wrote:
> Hi John,
> in ParenScript, which besides wouldn't make sense if you're using
> ParenScript to write inline scripts. If everything is going to get
> name-mangled, then there would have to be some escape procedure for
> identifiers that you don't want to name mangle (functions in other
> identifiers when you want to make your own functions for other
> to this that would work well in more than one use case.
and a Parenscript compiler that performs more advanced analysis. In this
case, introducing the concept of a "whole Parenscript program" would be
beneficial to Parenscript developers. It will not only allow a more
sophisticated code generator (for minifying, prefixing, etc.) but could also
make it easier to extend the compiler, generate documentation for a
Parenscript program, and otherwise manipulate Parenscripts programmatically.
I suspect that there are manageable solutions to problems like inconsistent
"name manglings" across different compilations. A package system that keeps
track of variable and function declarations can resolve identifier
references and rewrite them accordingly, leaving global or unresolved
identifiers alone. A few months ago I implemented the first steps of a
package system for Parenscript that does some semantic analysis to
accomplish prefixing as described. I did not attempt to solve the
"inline scripts" issue, but that problem seems far from impossible.
Of course users have varying use cases. I write lengthy programs in
standalone .paren files. Others may use Parenscript quite lightly to embed
scripts in HTML. We can probably find solutions that make everyone's life
I am generally of the opinion that Parenscript should be as close to Lisp as
possible. It is absurd that even in 2007 there is still so much fuss over
programming languages. It would be great if a separate Parenscript language
did not need to exist.
 remnants of that work are in the darcs repository for the Suave project
in the /suavescript/ directory: http://common-lisp.net/project/suave/
> On 6/19/07, John Fremlin <john at fremlin.org> wrote:
> > webpages. Aside from the fact that this is annoying, dangerous and
> > wrong, we have to accept that it is quite prevalent: from Google
> > AdWords to ReCaptcha.
> > If I might add a feature request, it would be to be able to make sure
> > that the identifiers generated by parenscript don't clash with
> > anything else.
> > _______________________________________________
> > parenscript-devel mailing list
> > parenscript-devel at common-lisp.net
> > http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the parenscript-devel