From: Douglas K. <do...@go...> - 2014-04-24 18:17:24
|
> > > I beefed up my test suite, and also imported the tests in > backq.impure.lisp into fare-quasiquote's test suite. Do you have > additional test cases? > > The patch I mailed last includes new tests. Fare-quasiquote differs on some results. A few are probably matters of opinion. e.g. I say that ``,,`,3 once eval'ed is `,3 and not 3. Another is that ``(,@,*QQ*) when once eval'ed prints for me as `(,@(*RR* *SS*)) instead of (*RR* *SS*). They mean the same thing but I like the preserved `,@. Two tests in 'pprint.impure.lisp' that were commented to effect of "these can't work" now work. Namely, the internal representations of `(foo . ,x) and `(foo ,@x) and `(foo ,.x) are all distinct in my code but indistinct in the current code and fare-quasisquote. The :preserving-backquotes-difficult test passes only for me, though it might be unfair to mention that since it required a change to PPRINT-POP. The cases which fail in fare-quasiquote are from my 'broken-macro' test. This macro's expansion should be printable whether or not it is evaluable. It could be a genuine use-case for a macro which is expanded by Lisp but interpreted by some Lisp-looking embedded mini-DSL that uses (QUOTE . FOO) as valid syntax; or it is simply that one needs to debug an ordinary Lisp macro whose output is faulty. Either way, four of the tests fail to convert (UNQUOTE x) to the prettier form ",x" and one of the tests crashes. All things considered, the near absence of pretty-print logic at the expense of slightly more expansion logic is a net reduction in source lines of code by perhaps 15% and by even more if using the structured commas. |