Chapter 8Macros
Macros give Clojure great power. With most programming techniques, you build features within the language. When you write macros, it’s more accurate to say that you’re “adding features to” the language. This is a powerful capability, so you should follow the rules in this chapter until you have enough experience to decide for yourself when to deviate. We’ll explore an example of how to use macros to add a new feature to Clojure.
While powerful, macros are not always simple. Clojure works to make macros as simple as is feasible by including conveniences to solve many common problems that occur when writing macros. We’ll explain these problems and show how Clojure mitigates them.
Macros are so different from other programming ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access