the reasoned schemer: handed out to all their analysts to explain logic programming to them so they can use the system
Macros: Why, When and How: Gary Fredericks
macro: special function that takes form as argument and returns a form
run at compile time
can always be replaced by its expansion
when writing macros, helps to know what you want it to expand to
use macroexpand-1 to find out when it's going to return
cannot pass macro to higher-order function (not composable at runtime)
macros can make code harder to read; person reading code has to be familiar with macro expansion to really know what your code is doing
tolerated usage: defining things, wrapping code execution, delaying execution, capturing code, DSLs, compile-time optimizations (hiccup produces as much html as possible at compile time)
avoiding macros: get more familiar with higher-order function usage and paradigms
writing tolerable macros: use helper functions, naming conventions, no side effects
syntax-quote (backtick): like quote on steroids, gives you multiple benefits when used in a macro