Thursday, February 28, 2008

Scheme For Enlightenment Part Twenty Three History of Lisp

You should really check out this 1979 paper on the History of LISP. This John McCarthy paper is a first hand account of what problems LISP was designed to solve, and how LISP was developed. This is the guy who designed and built the first LISP. By 1979, LISP was hardly news, so this paper wasn't written to extoll LISPs many virtues. It seems to have been written as an objective history, with as little bias as possible. In any case, it's a great read, and reasonably short.

At the end, John McCarthy talks about what it will take for a language to replace LISP.

LISP will become obsolete when someone makes a more comprehensive language that dominates LISP practically and also gives a clear mathematical semantics to a more comprehensive set of features.

The word obsolete is a funny word. Today, people talk about technlogical products with one of two words. Obsolete and Bleeding Edge. The idea is that either something is brand new and buggy, or it's old and useless. A synonym for Obsolete is Legacy. This term suggests that the bulk of the product has been built. In the case of software, you may tweak it a bit here and there, but for the most part, you leave it alone.

Modern thinking for languages suggests that if a language is the most popular, then everything else is obsolete. This is wrong, of course. Many languages enjoy niche markets. And, rightly so, as some languages are better for some tasks than others. Most languages are better at some task than any other language. The stereotypes for languages are often misleading. Here are some examples: Fortran is great at number crunching. C is good at operating systems. Perl is great at text processing and integrating things together. LISP is good for artificial intelligence research.

In many ways, there are no general purpose computer languages. It depends on what you need. You might write a web site in Perl. But there might be a bit of the site that performs a long running computation, for example to look for a bit of DNA in a database that is a close match of your sample. That bit might be written in C. Another bit tries to match what genes look like to what they do. That might be in LISP. And so on.

From this perspective, a language is obsolete when another language fills the same niche, and is better at it. LISP is good for functional programming. But so are Python and Ruby. So is LISP obsolete? No, LISP has this mathematical nature to it, and will itself be analyzable in ways that Python and Ruby will never be. But isn't Forth a language that might be analyzed in much the same way? Is Forth a better tool than LISP?

Corporate management would prefer fewer languages to many, for fear of not being able to find someone who knows some obscure language. So a language like Java, which has infinite libraries available, is attractive. So now we just have to find people who know all these libraries.

LISP has a relatively small niche. A smaller dialect, like Scheme, is unlikely to take over the whole niche. A large dialect, like Common Lisp, is also unlikely to take over the whole niche. So LISP can either be thought of as always having been obsolete, or will never be obsolete.

Fortran is a language that has undergone many changes. There was Fortran-60, then Fortran 66, then ANSI 77, and so on. The old saying is, "I don't know what language people will be using in the year 2000, but it will be called Fortran". This is even more true for LISP. LISP is a language where it is convenient to build new languages. The new languages don't have to look much like LISP. LISP could replace itself.

Of course if a language is Turing Complete, then it is equivalent to every other language.

No comments: