What You've Learned
This chapter covered macro programming. You’ve learned the following:
Macros let you write code that writes code. With macros, you can create your own programming language and convert it to standard Lisp just before the compiler can get a peek at it.
Macros allow you to get rid of that feeling of déjà vu when writing your code, in situations when nothing else can do so.
You must be careful when writing macros so that they don’t lead to unintentional, repeated execution of code.
You need to be careful to avoid unintended variable capture in macros. You can avoid this by using
gensymnames.If variables created by a macro are exposed on purpose, as a feature of the macro, the macro is called an anaphoric macro.
Macro programming is ...
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