O'Reilly logo

Clojure: High Performance JVM Programming by Akhil Wali, Shantanu Kumar, Eduardo Díaz

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

Macros as code modification tools

One of the first and most common uses of macros is to be able to modify code; they work on the code level, as you will see. Why should we do that? Let's try to understand the problem with something that you are more familiar with—Java.

Modifying code in Java

Have you ever used AspectJ or Spring AOP? Have you ever had problems with tools such as ASM or Javassist?

You have probably used code modification in Java. It is common in Java EE applications, just not explicit. (Have you ever thought about what the @Transactional annotation does in Java EE or Spring applications?)

As developers, we try to automate everything we can, so how could we leave out our own devtools?

We have tried to create ways to modify the bytecode ...

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