The Lisp Difference
Wednesday, December 15, 2004
When people compare their favorite programming language to Lisp, there is the very natural tendency to do the
comparison on the basis of what they are familiar with - usually syntax, standard
libraries, 3rd party library availability, code run-time performance,
etc. Paul Graham,
in his essay
"Beating the Averages" calls this "The Blub Paradox" - "programming languages are not merely technologies, but habits of mind as well, and nothing changes slower". For example,
if you are
going to compare CL to Java, and you are very familiar
with Java but only have a superficial knowledge of CL, you are
probably going to conclude that Java is superior because there are
many more libraries for Java and a lot more "stuff" available
for use with Java. You come to this conclusion because you are only
looking for things in CL that are already present in Java. What is
missed in such a comparison are the features of CL that aren't in Java
and which can't easily be identified as "features" by someone whose
background doesn't include experience in utilizing such features. One
of these CL features is the
advantage that comes with having a
"programmable programming language". The ability to use CL to
create a
Domain-Specific Language (DSL) is often overlooked in language
comparisons as most languages aren't very well suited to that
task and therefore the feature is ignored as a point of comparison.
Why is the ability to create a DSL such an advantage? The answer is
a two-pronged one: DSL's
raise the level of abstaction while, at the same time, they reduce the design
space. This makes it much easier and faster to code a solution for a
particular problem domain. The following diagram (from the web site of
Metacase, a DSL-modeling company - if you're interested in DSL's,
have a look at some of
their resources) illustrates the type
of productivity boost that can come from using a DSL:

Forget syntax, forget library availability - the "Lisp Difference" is
that it allows you to create whatever domain-specific language you
need for the problem space that you're working in. This difference, of
course, won't show up in "toy" benchmarks that compare multiple programming
languages; however, it will continue to be a major advantage for Lisp. You
only have to look at Microsoft's recent focus on
DSL tools in Visual Studio and
the debate that this approach is causing to understand why
this "Lisp Difference" is such an important feature of the language.

