> Never.
To be perfectly fair, this is not quite true. In Common Lisp (the dialect being used here), macros can break in rare, subtle ways. The obvious happens when you don't use GENSYM:
(defmacro foo (var)
`(let* ((x 3))
(setf ,var x)))
CL-USER> (let ((x 7))
(foo x)
x)
7
CL-USER> (let ((y 7))
(foo y)
y)
3
but is fairly easy to avoid. In practice, as long as you make judicious use of GENSYM and packages, the only thing you really need to worry about is someone FLETing a symbol in the package COMMON-LISP (or maybe an external symbol in your package): (defmacro bar (x y z)
`(list ,x ,y ,z))
CL-USER> (let ((list '(7)))
(bar 1 2 3))
(1 2 3)
CL-USER> (flet ((list (a b c)
(+ a b c)))
(bar 1 2 3))
6
SBCL actually yelled at me when I tried this for violating the package lock on COMMON-LISP. So in practice, it's really not much of an issue, and is certainly a hell of a lot better than C macros.If you're interested in learning more about this, look at Scheme's hygienic macros.