I'd encourage you to look at "Let Over Lambda -- 50 Years of Lisp" which is a new book devoted entirely to the subject of macros in lisp.
"This book is about macros, that is programs that write programs. Macros are what make lisp the greatest programming language in the world. When used properly, macros enable amazing feats of abstraction, programmer productivity, and code efficiency and security that are unheard of elsewhere. Macros let you do things you simply cannot do in other languages." Domain-specific languages (DSLs) are trivially easy to create with macros and vastly simplify programming. The end user can develop their own notation which can be "processed as written". This enables the end user to verify that the system is working from their specs. In my regular work, I have two embedded DSLs within my program which allows expressing concepts "in the language used by the customer". Because they are macros they do not require separate parsers. The original Java version had 2 embedded parsers with BNF specifications as well as a heavyweight XML backend. In addition, the single macro statements, depending on context, expand into source program text for an external compiler, a conditional concurrent assignment statement for logic programming, and an XML stream for further downstream processes. Internally within Axiom there are many uses of macros, the most common one is probably the spadcall macro. If you really want to understand the internals of Axiom's implementation, you need to understand macros. If you haven't tried using macros, I'd encourage you to look at this technology in common lisp. Tim _______________________________________________ Axiom-developer mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-developer
