Chapter 7Macros
Macros give Clojure great power. With most programming techniques, you build features within the language. When you write macros, it is more accurate to say that you are “adding features to” the language. This is a powerful and dangerous ability, so you should follow the rules in When to Use Macros, at least until you have enough experience to decide for yourself when to bend the rules. Writing a Control Flow Macro jump-starts that experience, walking you through adding 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. Making Macros Simpler explains these ...
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