[parenscript-devel] Inconsistent compilation of the empty list?

Daniel Gackle danielgackle at gmail.com
Thu Apr 26 02:14:23 UTC 2012


I have some test data where occasionally an empty list appears as an
element inside of some other list. It's getting compiled to the JS
string "[]" when what I need is the array literal [], in a way that seems
inconsistent.

Specifically, these are good:

  PS> (ps [])
  "[];"

  PS> (ps '())
  "[];"

  PS> (ps '(1 2))
  "[1, 2];"

But these are not, because they generate either the string '[]' or null as
the
second element, when what I need is the array literal []:

  PS> (ps '(1 []))
  "[1, '[]'];"

  PS> (ps '(1 ()))
  "[1, null];"

Is this an inconsistency? Is there a workaround?

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


More information about the parenscript-devel mailing list