On Feb 16, 10:19 pm, Sam Aaron <
samaa...@gmail.com> wrote:
> Does anyone have any pointers that will expand upon Byrd's issues with Clojure's macro system perhaps highlighting what the direction of future of macro systems might be?
One interesting newer macro system is SRFI 72 [1] by Andre van Tonder.
It's basically a hygienic defmacro, so you can write e.g. the swap
macro exactly as in Common Lisp, but it will be automagically
hygienic:
(define-syntax (swap! a b)
#`(let ((temp ,a))
(set! ,a ,b)
(set! ,b temp))))
(#` is hygienic quasiquote)
A completely different approach to hygiene is offered by Kernel's
fexprs [2]. Fexprs make the whole issue of hygiene moot, because they
simply use lexical scope already built in to the language to maintain
hygiene, as I've explained on LtU [3].
[1]
http://srfi.schemers.org/srfi-72/srfi-72.html
[2]
http://web.cs.wpi.edu/~jshutt/kernel.html
[3]
http://lambda-the-ultimate.org/node/4345#comment-66868