[parenscript-devel] CREATE: incorrect translation of argument names
Vladimir Sedach
vsedach at gmail.com
Sat Oct 24 18:55:07 UTC 2009
Hi Leslie,
Keyword treatment is kind of a sore point for PS. The compromise based
on use cases that we came up with (this thread provides some
background: http://common-lisp.net/pipermail/parenscript-devel/2009-July/000569.html)
is to always translate keywords as strings, and to not perform any
name mangling on them (this is so you can use keywords like :+ and :%
and whatever and have them be easy to read - useful for things like
parsers; this also keeps the rules for symbol-to-js translation
reasonably not crazy).
The way to do what you're looking for (this works in the repository
version, but not in the latest release) is: (ps:ps ((create foo-bar
1)))
Ie - CREATE now treats its slot arguments as literals; there is no
notion of "initargs" or anything else.
Thanks,
Vladimir
2009/10/24 Leslie P. Polzer <sky at viridian-project.de>:
>
> Not sure if this is intended behavior with the next-generation
> Parenscript, but:
>
> (ps:ps ((create :foo-bar 1))) => "({ 'foo-bar' : 1 })();"
>
> This used to be converted properly to 'fooBar'. Now I have to specify
> a string instead which is not really lispy.
>
> Leslie
>
> --
> http://www.linkedin.com/in/polzer
>
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
More information about the parenscript-devel
mailing list