Syntax Rules Primer For The Merely Eccentric

In learning to write Scheme macros, I have noticed that it is easy to find both trivial examples and extraordinarily complex examples, but there seem to be no intermediate ones. I have discovered a few tricks in writing macros and perhaps some people will find them helpful.

The basic purpose of a macro is syntactic abstraction. As functions allow you to extend the functionality of the underlying Scheme language, macros allow you to extend the syntax. A well designed macro can greatly increase the readability of a program, but a poorly designed one can make a program completely unreadable.

Read the Full Heresy

This is a preview. Sign in — it's free — to keep reading.

Sign In to Read the Full Essay →