[parenscript-devel] Inconsistent compilation of the empty list?
    Vladimir Sedach 
    vsedach at gmail.com
       
    Fri Jul 27 21:44:45 UTC 2012
    
    
  
Hi Dan,
>   PS> (ps '(1 []))
>   "[1, '[]'];"
That is indeed weird. I fixed it by treading [] as a special case
(like a single-quoted nil). The patch is in the repository.
>   PS> (ps '(1 ()))
>   "[1, null];"
Now this is not weird, because the base case here is '(()) aka '(nil).
This is the unfortunate side effect of CL treating () and nil
equivalently and Parenscript treating () and [] equivalently. There's
no way to tell from the context which is the "right" way to compile
'(()). I think it is more consistent to have '(()) compile to [null]
rather than [[]], but I am open to hearing other options.
Vladimir
    
    
More information about the parenscript-devel
mailing list