Revenge of the Nerds
****
| Want to start a startup? Get funded by
Y Combinator. |
May 2002
| "We were after the C++ programmers. We managed to drag a
lot of them about halfway to Lisp."- Guy Steele, co-author of the Java spec |
*(This is an expanded version of the keynote lecture at the
International ICAD User's Group conference in May 2002.
It explains how a language
developed in 1958 manages to be the most powerful
available even today, what power is and when you need it, and
why pointy-haired bosses (ideally, your
competitors' pointy-haired bosses) deliberately ignore this issue.)
Note: In this talk by "Lisp", I mean the Lisp family of
languages, including Common Lisp, Scheme, Emacs Lisp, EuLisp,
Goo, Arc, etc.*
-->
It's fairly common for programs written in Lisp to include
Lisp. Emacs does, and so does Yahoo Store.
But if you think about it, that's kind of strange.
How many programs written in C include C, in the sense that
the user actually runs the C compiler while he's using the
application? I can't think of any, unless you count Unix
as an application. We're only a minute into this talk and
already Lisp is looking kind of unusual.
Now, it is probably not news to any of you that Lisp is
looking unusual. In fact, that was probably the first thing
you noticed about it.
Believe it or not, there is a reason Lisp code looks
so strange. Lisp doesn't look this way because it was designed
by a bunch of pointy-headed academics. It was
designed by pointy-headed academics, but they had hard-headed
engineering reasons for making the syntax look so strange.
Are All Languages Equivalent?
-->
In the software business there is an ongoing
struggle between the pointy-headed academics, and another
equally formidable force, the pointy-haired bosses. Everyone
knows who the pointy-haired boss is, right? I think most
people in the technology world not only recognize this
cartoon character, but know the actual person in their company
that he is modelled upon.
The pointy-haired boss miraculously combines two qualities
that are common by themselves, but rarely seen together:
(a) he knows nothing whatsoever about technology, and
(b) he has very strong opinions about it.
Suppose, for example, you need to write a piece of software.
The pointy-haired boss has no idea how this software
has to work, and can't tell one programming language from
another, and yet he knows what language you should write it in.
Exactly. He thinks you should write it in Java.
Why does he think this? Let's
take a look inside the brain of the pointy-haired boss. What
he's thinking is something like this. Java is a standard.
I know it must be, because I read about it in the press all the time.
Since it is a standard, I won't get in trouble for using it.
And that also means there will always be lots of Java programmers,
so if the programmers working for me now quit, as programmers
working for me mysteriously always do, I can easily replace
them.
Well, this doesn't sound that unreasonable. But it's all
based on one unspoken assumption, and that assumption
turns out to be false. The pointy-haired boss believes that all
programming languages are pretty much equivalent.
If that were true, he would be right on
target. If languages are all equivalent, sure, use whatever
language everyone else is using.
But all languages are not equivalent, and I think I can prove
this to you without even getting into the differences between them.
If you asked the pointy-haired boss in 1992 what language
software should be written in, he would have answered with as
little hesitation as he does today. Software should be
written in C++. But if languages are all equivalent, why should the
pointy-haired boss's opinion ever change? In fact, why should
the developers of Java have even bothered to create a new
language?
Presumably, if you create a new language, it's because you think
it's better in some way than what people already had. And in fact, Gosling
makes it clear in the first Java white paper that Java
was designed to fix some problems with C++.
So there you have it: languages are not all equivalent.
If you follow the
trail through the pointy-haired boss's brain to Java and then
back through Java's history to its origins, you end up holding
an idea that contradicts the assumption you started with.
So, who's right? James Gosling, or the pointy-haired boss?
Not surprisingly, Gosling is right. Some languages are better,
for certain problems, than others. And you know, that raises some
interesting questions. Java was designed to be better, for certain
problems, than C++. What problems? When is Java better and
when is C++? Are there situations where other languages are
better than either of them?
Once you start considering this question, you have opened a
real can of worms. If the pointy-haired boss had to think
about the problem in its full complexity, it would make his
brain explode. As long as he considers all languages
equivalent, all he has to do is choose the one
that seems to have the most momentum, and since that is more
a question of fashion than technology, even he
can probably get the right answer.
But if languages vary, he suddenly
has to solve two simultaneous equations, trying to find
an optimal balance between two things he knows nothing
about: the relative suitability of the twenty or so leading
languages for the problem he needs to solve, and the odds of
finding programmers, libraries, etc. for each.
If that's what's on the other side of the door, it
is no surprise that the pointy-haired boss doesn't want to open it.
The disadvantage of believing that all programming languages
are equivalent is that it's not true. But the advantage is
that it makes your life a lot simpler.
And I think that's the main reason the idea is so widespread.
It is a comfortable idea.
We know that Java must be pretty good, because it is the
cool, new programming language. Or is it? If you look at the world of
programming languages from a distance, it looks like Java is
the latest thing. (From far enough away, all you can see is
the large, flashing billboard paid for by Sun.)
But if you look at this world
up close, you find that there are degrees of coolness. Within
the hacker subculture, there is another language called Perl
that is considered a lot cooler than Java. Slashdot, for
example, is generated by Perl. I don't think you would find
those guys using Java Server Pages. But there is another,
newer language, called Python, whose users tend to look down on Perl,
and more waiting in the wings.
If you look at these languages in order, Java, Perl, Python,
you notice an interesting pattern. At least, you notice this
pattern if you are a Lisp hacker. Each one is progressively
more like Lisp. Python copies even features
that many Lisp hackers consider to be mistakes.
You could translate simple Lisp programs into Python line for line.
It's 2002, and programming languages have almost caught up
with 1958.
Catching Up with Math
What I mean is that
Lisp was first discovered by John McCarthy in 1958,
and popular programming languages are only now
catching up with the ideas he developed then.
Now, how could that be true? Isn't computer technology something
that changes very rapidly? I mean, in 1958, computers were
refrigerator-sized behemoths with the processing power of
a wristwatch. How could any technology that old even be
relevant, let alone superior to the latest developments?
[...]