[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The power of Lisp macros

A while back we were talking about Lisp syntax and macros, and my belief 
that macros and Lisp's highly macro-friendly syntax is the most uniquely 
valuable element of Lisp.

Well, here's an article from one of the developers of a real-world 
commercial application (the Orbitz search engine) written in Lisp, and I 
found their experience in this area to be an interesting data point in 
support of my own perception:

"We make a lot of use of Lisp's macro capabilities, but shy away from 
many other Lisp features like closures, generic functions, complex 
sequence functions and garbage collection."


In the discussion of this piece on Slashdot, another member of the 
development team ("cracauer") expands on this:

"2d) compile-time computing, a key element to make our software fast
without cluttering it up by expensing manually written source code by
a factor of 100 or by inventing ad-hoc code generators which need to
be debugged after they broke your system for weeks. Macros that can
use the full language at compile time and macros that can "walk" their
argument when passed at compile-time to find interesting things to do
with them. Also see define-compiler-macro to get an idea what makes
Lisp code fast while maintaining elegance (use with care, though)."