Seibel: So you actually ended up doing your degree in broadcasting; afterthat what did you do?

Crockford: I started a master’s program in educational technology. But Ifelt like I was so far ahead of where the program was that I was just wastingtime. I left that after about a year and went to work at SRI in Menlo Park, asa researcher. Then I went to a company called Basic Four, which wasmaking small business minicomputers and spent a lot of years there. Ideveloped a word-processing system for them and started doing someresearch into portable machines and PCs. I tried to push that company intoPCs; I bought the first PC in the company and left it open on my desk sothat the engineers could come look at it and see what IBM had done, butultimately I couldn’t change the culture there—they were pretty set in whatthey were doing.

Then one Christmas, maybe it was Christmas of ’81, I bought an Atari 800. Iwent to the computer store and there was an Apple II and an 800 and the800 looked to be snazzier so I got that one. I thought that I’d write a wordprocessor on it or a programming language for it. But the 6502 was just notup to doing anything. So I’d spent two thousand dollars for the thing—whatcan it do? Well, obviously it can do games. So I started writing computergames and I sold one to Atari and then got an offer to work in theirresearch laboratory in Sunnyvale. That was the research lab that Alan Kayhad started, his first thing since PARC. So I went there and it was great. Iwas there for two years and watched the company melt down. But Imanaged to do some interesting work there. Worked with some reallygood people.

Seibel: Had you ever been a game aficionado before that?

Crockford: I’d thrown some quarters at Space Invaders and Pac-Man. Iliked the games; I wasn’t hard-core. The interesting thing about games forme was it was another place where television interacted with computers. Itwas the first place where the public got to participate in that interaction. Ithought that was really interesting.

Seibel: After Atari melted down, what next?

Crockford: Then I went to Lucasfilm and was there for eight years.

Seibel: And Habitat started while you were there.

Crockford: It sure did. A friend of mine, Chip Morningstar, started thatproject. He invented the avatar; he invented the graphical virtual world. Hedid all that stuff first. It ran on Commodore 64s and off-peak x25 networks.Just amazing foresight in the design of that thing—he got so much right, itwas amazing. I was sort of a spectator. I saw them doing it and encouragedthem. But I can’t take any credit for what they did.

Seibel: And then you went with them to found Electric Communities,which built upon those ideas?

Crockford: Right. Morningstar and Randy Farmer left Lucasfilm to start acompany called the American Information Exchange, which took their ideaof a social server and applied it to the idea of online markets. Brilliant idea,but ahead of their time. Had they been a little bit later, they could havebeen eBay.

Then we got the idea of well, let’s do that again and come up with acommon platform which does the entertainment thing and the social thingand the business thing and the commercial thing and everything and we’ll dothe platform for the whole world. And we had some ideas about how tomake it fully distributed so that there is no single server—that it all spreadsover the Net. And we would come up with security models that wouldallow it to be fully decentralized. It was a really powerful idea and that wasthe idea behind Electric Communities.

Seibel: And that’s where the first versions of E came from.

Crockford: Right. We needed a secure programming language to developthe platform and the applications in. And our first attempt at that wassomething called Joule which was being developed at another companycalled Agorics. Joule was an actor language and was pretty odd in the waythat it did things—it was brilliant but unconventional.

We had concerns about Joule. Were we going to be able to get people touse this language; is it too freaky? Then we came up with the idea of E,which was taking the core actor concepts out of Joule and reimplementingthem on top of Java.

Seibel: Did E ever have any adoption by anyone other than its inventors?

Crockford: Not the original language. The old E was a Java dialect. We hadall sorts of problems with Sun about that. We then came up with an Escripting language that was lighter but had similar properties. And that is thelanguage which is now called E.

We developed that language at Electric Communities but I don’t think weever made use of it. But at one point we decided that we weren’t using it,but it was good stuff so we spun it out and I’m really happy to see that itsurvived.

One of the things that was good for me in being at Electric Communities isit taught me to think in terms of closures. So when I started doing web stuffI looked at JavaScript and said, “There’s something familiar about this.”Because a lot of JavaScript’s heritage comes from Scheme but you look atthe documentation and there’s nothing there that tells you that there areclosures in the language. So I kind of discovered it by accident and went,“Whoa! This is great.” And I’ve been promoting that idea that you canactually do serious programming in this silly little language.

Seibel: So that sort of brings us to the recent controversy aboutECMAScript 4. I gather that you like the simplicity of the ES3 version ofJavaScript.

Crockford: Well, ultimately, the significance of the changes you can maketo a language is related to the success of the language. The more successfulthe language is, the greater the cost of changing it. You have greater reeducationcosts and you have the potential costs of disruption which, as youbecome bigger, become unacceptable. When you’re really successful, youneed to be extremely cautious in any changes that you make. Whereas ifyou haven’t made it yet, you have a lot more freedom in changing it around.

JavaScript, purely by accident, has become the most popular programminglanguage in the world. There are more JavaScript processors in the worldthan any other language by far. And for all of its problems with its securitymodel, JavaScript is the only language where you can write code and run iton any machine.

And if that weren’t enough, it’s now being embedded in a lot of applications.Most of the Adobe applications have JavaScript in them so you can scriptthem locally. And other applications as well. So it’s become hugely popular.

The problem with the language is that it was rushed to market way too fastand standardized way too fast. So most of its defects are not in the currentimplementations—they are in the specification. The standard says do thisincorrectly. Which is appalling. But that’s the state of it. It got frozen in 1999and then should have gone into neglect and died. But instead, by accident,Ajax happened and suddenly it’s the world’s most important programminglanguage.

So now we’re thinking that we need to fix it. But the time to have fixed itshould have been in 2000. But it didn’t get fixed then, back when everyonewas paying no attention to it. Now it’s huge.

There’s another thing that’s odd about JavaScript in the web context: Ifyou’re doing a server application or a desktop application or an embeddedapplication, you get to choose not only the language but which specificcompiler you’re going to use, which specific runtime you’re going to use.You don’t get that choice in JavaScript. You have to run on everything that’sout there.

Because we have to run on everything, bugs don’t get fixed. If a browsermaker ships a bug and goes, “Oops, we screwed up,” and the next monththey ship another one, we cannot depend on all of their users doing theupgrade. The mainstream, once they get IE installed on their machine, that’sit; they don’t upgrade. Those bugs stay there for years.


Перейти на страницу:
Изменить размер шрифта: