Brendan Eich
144
Eich: There are two big problems, obviously. C syntax means that you have
a much harder time than with s-expression, so you have to define your
ASTs and we’re going to have to standardize them and that’s going to be a
pain. Then there’s the other problem, which is hygiene is still not quite
understood. Dave Herman, who’s working with us is doing his thesis—or
was last I checked—on a kind of logic for proving soundness for hygiene,
which is, I hope, beneficial. Because we will get to macros.
I said this to Doug Crockford a couple years ago when he had me speak at
Yahoo! I started talking about the sugar that I was enthusiastic about. He
said, “Gee, maybe we should do a macro system first,” and I said, “No,
because then we’ll take nine years.” At the time there was a real risk
politically that Microsoft was just not going to cooperate. They came back
into ECMA after being asleep and coasting. The new guy, who was from
Hyderabad, was very enthusiastic and said, “Yes, we will put the CLR into
IE8 and JScript.net will be our new implementation of web JavaScript.” But I
think his enthusiasm went upstairs and then he got told, “No, that’s not
what we’re doing.” So it led to the great revolt and splitting the committee.
So we were concerned that if we went off to do macros we were doing
research, and if we were doing research we were not going to have
Microsoft engaged and we were not going to be putting competitive
pressure on them. So macros have had to wait. I’m fine with that so long as
we do the right automated grammar checks and we do make sure we can
recast all of the sugar as macros when we have macros. But in the meantime
there’s no reason to starve the users for sugar. It doesn’t rot their teeth
and it helps them avoid mistakes.
Seibel: Back in 1995, what other languages influenced your original design
of JavaScript?
Eich: Self was big, mainly because of the papers that Dave Ungar had just
written. I never played with any Self code, but I was just inspired by them. I
like Smalltalk and here was somebody taking one idea applied to Smalltalk,
which was prototype-based delegation—multiple prototypes unlike
JavaScript—and just running with it as hard as they could. That was inspiring
to me because there was both good compiler, VM-level engineering and, I
thought, good language design.