Re:Just what does “code as data” mean anyway? (2014)
by metaobject on Friday February 16, 2018 @01:07PM
(#16394329)
And I'm just pointing this out for those who aren't already aware -- C macros and Lisp macros aren't really comparable.
C macros are implemented as string substitutions in a separate step before compilation. Lisp macros can make use of the rest of the language features and allow for operations on the abstract syntax tree of the code, opening up things like adding new control constructs, generating boilerplate code, string substitution, and the creation of domain specific languages.
Yes, any idiot can write unreadable Lisp — but good Lisp is a work of art. The Art of the Metaobject Protocol should be required reading: it builds an entire object system, complete with classes and generic functions (multimethods), written in the language itself. It's a tour de force.