O'Reilly logo

Mastering Clojure Macros by Colin Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3Use Your Powers Wisely

Now that you have the knowledge you need about how to write macros, it’s time to start building a great sense for when to write them. Believe it or not, macros do have downsides. In fact, there’s a popular saying in the Clojure world that you should never use a macro when a function will do. In this chapter you’ll see some problems that are inherent to macros, a few outright mistakes to avoid, and some design decisions that can make maintenance harder down the road.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required