[ Take a tour of today's Internet-oriented dynamic scripting languages. ]
Eich: ECMAScript is the standards name for the language. Its number is ECMA-262 and it’s a name that the standards body came up with because they couldn’t get anybody to donate a trademark that was agreeable to all parties. So there’s an issue with marketing the programming languages.
Eich: The idea was to make something that Web designers, people who may or may not have much programming training, could use to add a little bit of animation or a little bit of smarts to their Web forms and their Web pages.
So it’s 1995, the Web is very early. HTML was 3.2, I think, or something like that. People did not have much programmability. Java was coming along at the same time but it required you to use a high-powered programming language and then run a compiler and put your code into a package that became an applet that was part of the page but it was in a little silo. It was kind of walled off.
That idea was very strongly held by Marc Andreessen and myself. Bill Joy at Sun was the champion of it, which was very helpful because that’s how we got the name. And we were pushing it as a little brother to Java, as a complementary language like Visual Basic was to C++ in Microsoft’s language families at the time. And it took off. We got it out in time.
[ Get inside the minds of the leaders of open source with InfoWorld's open source roundtable. ]
And then, of course, it was much, much later that we had things like Google Maps and Google Mail and all the other AJAX apps people know about.
Eich: There’s a general bad odor. [lingering from the browser wars and Internet Explorer's Document Object Model (DOM) being different]. The language implementation between the browsers agrees generally and pretty well compared to the library code, the so-called document object model. Other browsers' implementations tend to agree [with the DOM] because they came later and had a standards orientation.
Eich: I’d say, especially Ruby and Python and Perl have had great community, open source community development over the years where they don’t have to worry about being in every browser and working on arbitrary Web pages across billions of Web pages. Instead, they can say, "Here’s the new version, port your code." They can bind very tightly to the operating system, which are the server APIs. So they can be really tight and useful and very powerful in their domains, but their domains don’t have to have code-sharing in the same ubiquitous way that Web pages are shared.
Eich: Yes. I think that’s great, and I think we will support other programming languages. The problem is that if other browsers don’t all jump on the same bandwagon, then the developers won’t be able to count on it in this broad Web content way that reaches all browsers.
What will be interesting will be to see how it’s standardized because until it’s really in all browsers, developers can’t count on it.
InfoWorld: I think APAX and ARAX are just for Silverlight. That’s the only thing they’re useful with at this point.
Eich: You could use HotRuby for ARAX, so that technique is possibly applicable to Python too.
To write large code, you don’t just want this little snippet language that I made easy for beginners to start buying by the yard. You want strong APIs, ways of saying -- this is my module and this is your module and you can throw your code over to me and I can use it safely.
To do that, you need more than is in the current third edition of the language. You need some kind of a way of talking about the types of values, some way of talking about interfaces or the arguments that can go into a function in the result and come back. Can they be of any type? Can they be of the wrong type? Or can they only be of certain types?
We’d like to be flexible about this and not make things painfully static in a fixed way like Java does. We’d like to say, "Here’s the patterns people use in their code today. Here are the latent types they use for their data. Their data types look like these JSON objects, these trees of data." We can write down very concise descriptions of those in the fourth edition using the [type] system, and then you can have the implementation automatically check that the shape of the data matches. So you can make sure that somebody isn’t sending you the wrong data by accident or maliciously -- you can make sure that certain names can’t be changed to mean something other than what they should mean.
InfoWorld: So is this the first major upgrade in what -- 13 years?
Eich: Nine years.
Eich: Well, we’re trying to work together in the ECMA working group and it’s going OK but we have a split committee. So part of the committee is focused on what’s being called ECMAScript 3.1 and the idea there, at least the idea that I think everyone in the committee agrees with, is that it would be a small improvement to the third edition, the last edition from 1999. That it would fix known bugs, it would maybe add a few standards that are already implemented in three out of four browsers, maybe it would add a few more things. But it has to be pretty small because, for one thing, it’s supposed to be a subset of the fourth edition. It’s not supposed to have anything in it that’s not in the fourth edition. And it’s also supposed to be done sooner, so if they keep adding things to it, it’ll never get done.
I’m hopeful that it does come through because it would be an improvement. In many ways in Firefox we’ve already moved way beyond what’s in there. There are a few things in there that might be good to add to Firefox, so I’m not saying we thought of it all before, but some of it is just based on work we’ve already done. And so we don’t want to take a step backwards and do only 3.1 -- that’s why we’re doing 4. Microsoft seems much more focused on 3.1, and that’s their choice.
InfoWorld: What is Project Screaming Monkey? Apparently it’s some kind of a scripting engine for Internet Explorer?
Eich: Yes. Internet Explorer is a very flexible platform, and you can add scripting engines. They made it possible to add Visual Basic script and so they allowed other people to add Perl and Python; ActiveState did that. So we’ve commissioned Mark Hammond who worked at ActiveState to do active scripting glue for Tamarin, which is the Adobe-donated virtual machine for ActionScript, an ECMAScript implementation, that’s in the Flash Player.