> me tinks itz me dat is brain ded :)
No, it really *is* the language.
In LISP, for example, there is a proper way to handle this name-capturing
problem. Plus, your preprocessor is just LISP writing LISP code. ;-)
(defmacro square (x)
(let ((sym-x (gensym "x-")))
`(let ((,sym-x ,x))
(* ,sym-x ,sym-x))))
> (macroexpand '(square (setf a (+ a 1))))
(LET ((#:|x-984| (SETF A (+ A 1))))
(* #:|x-984| #:|x-984|))
--
regards, [EMAIL PROTECTED] (o_
Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)