Hacker News new | ask | show | jobs
by avmich 14 days ago
I am confused about Clojure having full Lisp macros. Paul Graham described another kind of macros in Lisp, which when I checked wasn't available in Clojure.
1 comments

It’s called hygienic macros. Has to do with details around symbol capture. Idea originated in scheme, IIRC.

All those approaches are "full" lisp macros. You have all of lisp or clojure or scheme available at macroexpansion time.

I think they are called read macros or something like that.
Correct, user-written reader macros aren't allowed in Clojure. Rich decided the tradeoffs for adding them weren't in the language design's favor. Tagged literals are available, which lets Clojure users do some (?) of the things that reader macros enable. I haven't reached for them myself, so I don't know what the use cases are.

https://clojure.org/reference/reader#tagged_literals