This answer is not so much about Clojure, but Lisp and macros in general.
Remember:
APPLY is the ability to call functions with argument lists that are created at runtime.
Macros to generate new source code from some source code - and the generated source code will be launched.
Now:
If you allow the application to feed other source code to the macro at run time, you need to be able to generate the result code at run time, as well as execute the generated code.
Thus, in a compiled Lisp system, each APPLY call using a macro potentially creates new code that must be compiled at run time in order to be able to execute. It also means that you may get new compiler errors at runtime, when your code is executing, and the code has some problems. Therefore, to use macros at run time, you need a compiler and all the necessary information (for example, other macros) to be able to extend and compile the code.
It also means that in general, you cannot compile APPLY with a macro before execution, since it is not known which run-time arguments will be applied.
There can be more information in the Lisp interpreter, and macros can be applied all the time.
At the beginning of Lisp there were ordinary functions and the so-called FEXPR. FEXPRs allowed flexible call and runtime processing. Later in the history of Lisp, they were replaced by macros, because macros allow efficient compilation, and on compiler-based systems they allow processing of syntax errors before starting.
Rainer joswig
source share