Re:Learning Clojure: comparing with Java streams
by virmundi on Sunday November 04, 2018 @02:37PM
(#18377662)
When I worked with Clojure the community seemed to treat macros as a nuclear option. Only use them when absolutely necessary. For some, this translated to “you can’t hug your children with nuclear arms”. If the community hasn’t changed, perhaps macros out of favor.
[ Parent
| on HN ]
Re:Learning Clojure: comparing with Java streams
by serpix on Monday November 05, 2018 @01:48AM
(#18380377)
This still stands, macros are a really high level abstraction and do not compose. Almost always a function is enough. But if it saves a good chunk of repetition on something complex then go for it.
A good example of code with macro overkill is compojure-api. There is just so many clever macros that you need to read the original source code with a microscope to know what the code expands to.