Implementing scheme style macros in clojure

clojure, scheme

Solution

By "Scheme-style macro system", I'm not sure if you mean `syntax-rules` (the simple pattern style system) or `syntax-case` (the more flexible system which, along with `datum->syntax`, actually does let you bend or flat-out break hygiene).

Also, Racket has `syntax-parse`, which a bit simpler to use than `syntax-case` and (among other things) makes it pleasant to write macros which give intelligible error messages.

Regardless of which you mean, there is a Clojure project that purports to implement aspects of all three. However I haven't tried it and I can't vouch for how successfully it does so.

Problem

I often read debates about why hygenic macros are better and that clojure's macro system is based upon Common Lisp and is not hygenic. My question is: can a scheme style macro system be implemented in clojure and what are some examples of scheme style macros implanted in other lisps.

Original source