[parenscript-devel] &whole behaves differently in PS

Vladimir Sedach vsedach at gmail.com
Fri Sep 21 00:50:06 UTC 2007


> In Lisp:
>
>   (defmacro lisp-blah (x y &whole w) w)
>   (macroexpand-1 '(lisp-blah 10 20)) => (LISP-BLAH 10 20)

That's not a feature, that's a bug in Allegro CL!

"If &whole and a following variable appear, they must appear first in
lambda-list, before any other parameter"

Patch for correctly implementing top-level &whole in ParenScript macro
lambda lists forthcoming.

> Also, if you do this:
>
>   (defmacro/ps blah (x y &whole w) w)
>
>  then the following expression hangs:
>
>   (ps::ps-macroexpand '(blah 10 20))

Recursive macroexpansion! Try (defmacro foo (&whole x a b) x) (foo 1
2) and it should hang in Lisp too (it does in SBCL).

Happy hacking,
Vladimir



More information about the parenscript-devel mailing list