News for hackers. Stuff that matters.
Re:Data notation in Clojure by ollran on Thursday July 01, 2021 @03:45PM (#27703678)
Oh yes, reader macros, now I get it. As far as I know, you cannot write your own reader macros in Clojure (unlike in Common Lisp).
Re:Data notation in Clojure by drcode on Thursday July 01, 2021 @05:40PM (#27705216)
Yes you can, but they are a bit constrained in what they can do. For instance, it's easy to write a debug macro that prints the intermediate value of b+c:

(let [a #d (+ b c)] ...)

So the #d reader macro has access to the following form, but gets ignored at a higher level (i.e. when the "let" form is processed)