Monday, July 1, 2013

What language Y is to LISP as Mac OS X is to Unix?

In his Rarely Asked Questions, Paul Graham once more espouses LISP as the ultimate, untoppable programming language (and yes, autocomplete wants to approriately turn that into "unstoppable").

One of the points he makes to support this, is that for any language to become as good as LISP, it would actually need to become LISP. While it is a cogent point and well argued, I don't buy it. More precisely, this is what he writes on what it would take to add the equivalent of LISP macros to another language:

But it would be hard to do that without creating a notation for parse trees; and once you do, your language has become a skin on Lisp, in much the same way that in OS X, the Mac OS became a skin on Unix.
Hmmm...I am not sure that this analogy is making his point, because Mac OS X is far, far superior to raw Unix for most people, and preferred by hackers, as he himself writes in Return of the Mac:
All the best hackers I know are gradually switching to Macs.
Of course, I may be stretching the analogy too far, but it seems to me that it doesn't support Paul's thesis of LISP superiority, but rather clearly points to some language Y that delivers LISP's power in a much more useful and usable form.

Any ideas what this language Y might be?


Thomas Farrell said...


Kevin said...

Oy, if Y is Water, you must not think much of OSX, Thomas.

Contrary to Graham, the notation for parse trees in meta-programming languages is more commonly a templated version of the base language rather than a simple list notation.

Lisp is impressive and receives marks for a lot of firsts but I think Graham makes too much of the fact that conversion between equally expressive languages means that everything can be seen as a thin wrapper on Lisp.

Lisp includes both syntax and semantics, and a lot of people want nicer (read: more useful) syntax and they don't like its default semantics. Isomorphism between the models is besides the point.

Kevin said...

btw, Y might be Io, at least in terms of syntax.

Joscha Bach said...

Your question might not have a definite answer. For instance, Python is much more friendly than Lisp (which might be analogous to the polished UI of the Mac), but it is also less powerful (which cannot be said for MacOS). Python is iOS.

The most obvious answer might be Scheme: nicer syntax than Common Lisp, but way fewer libraries. Like MacOS, Scheme is easier to learn. And you can combine it with Common Lisp macros. But is this a valid answer for you? After all, Scheme is not like Lisp, but it is a Lisp.

Perhaps you want to look at Ruby, which is quite lispy, yet sleek, but it has not established itself as a general purpose language.
On the other hand, you could take Haskell, which has awesome syntax and offers most of the power of Lisp, and a few additional tricks, too. But Haskell is not a skin on Lisp (which in turn is a skin on the untyped Lambda calculus), but builds on the typed Lambda calculus, i.e. represents a different family of functional approaches.