>> Speaker 2: This is the most important discovery of the 21st Century.
[00:00:39] And you made this?
>> Douglas Crockford: Yeah, I did that.
>> Speaker 2: [INAUDIBLE]
>> Douglas Crockford: So I'll give you some historical background. At the National Center for Supercomputing Applications at the University of Illinois, Urbana-Champaign, there are a bunch of kids who are developing a client program for the Internet. At that time, there were a number of protocols that were being considered for the way that the Internet was going to deliver information to people.
[00:01:06] There was WAIS, Archie, Gopher, FTP, Finger and a few others and the World Wide Web. And these guys didn't know which of those was going to win. So they wrote a program that worked for all of them and they called the program mosaic. And because of the way that they implemented the viewer for the World Wide Web.
[00:01:28] The World Wide Web one and the thing that they did was they came up with something called the image tag which allowed. The web to display images, which is something that the other formats couldn't easily do. And because the web could display images, it could look like what you wanted it to be even if it wasn't what you wanted it to be, and that was efficient and that allowed the web to win and everything took off from there.
[00:01:55] A bunch of the people from that project where it lured to California, where they became part of a company called Netscape. Netscape made the first commercial web browser called Netscape Navigator, and it was a huge hit. It kinda disrupted everything, and they were then planning what to do for Navigator 2.
[00:02:18] And they added a bunch of new features including support for electronic commerce. They also wanted to make it easy for end user programming. They remembered something that had been on the Macintosh called HyperCard. HyperCard was a simple application creation program based on a simple metaphor of stacks of cards and it was an event driven script thing.
[00:02:44] And it was remarkably easy to use and they wanted something like that in the web browser. So they gave that job to this guy. This is Brendan Eich very smart guy, he'd been a kernel hacker at Silicon Graphics, his idea was he would write a Scheme interpreter to do this.
[00:03:01] And he was told no don't do Scheme, do a language that people like. Make it look like Joller, Visual Basic, something popular. This is for the kids. So he was given ten days to create a prototype of this new interactive browser and in those ten days. He designed and implemented a new programming language which is an amazing achievement.
[00:03:52] And there's a dialect of Smalltalk called Self that was developed first at Xerox Parc and then later at Sun Labs. Self, took Smalltalk, which was the first modern classical language, object oriented language and made it better. Both better performance and more expressive user to use by removing one feature from Smalltalk.
[00:04:16] It's uncommon where someone makes a new language by removing things from another language. Usually it's adding more stuff. The thing they removed from Smalltalk was classes. By removing classes, they could make it faster, and they could make it much better to program. And so, he took out idea and put it into his language and that Cape called it LiveScript.
[00:04:40] Now, while that was going on there was another language that was being developed by a guy at Sun named James Gosling. He started with something called Green talk. He was then moved into a new company that was developing set top box applications their his language became called oak.
[00:04:56] That company failed so his brought back into Sun and they try to figure out what do we do with this language now. The Internet was becoming popular, the web becoming popular, they wrote a web browser in this language. That browser called HotJava was wildly successful at least for a short time and the language that.
[00:05:19] They wrote it in, had its name changed to Java and it became wildly successful. So much so that some were making noise that the Java language was going to be the future of software. That if you design all of your programs to target the Java virtual machine instead of the operating system we can be liberated from Microsoft.
[00:05:44] And that was a wildly successful message and Java shoots up like that. It is the most successful launch of a new programming language in history. It's amazing. At Netscape, they're making similar claims. They're saying if you design your applications to target the web browser. It doesn't matter what operating system we're on, and again, we can be liberated from Microsoft.
[00:06:09] Now these two companies realized, if we're both going after Microsoft we'd probably better work together because if we don't. Microsoft play us off against each other and we'll both lose. So they form an alliance, and the first thing they agree on is that Netscape adds Java to the web browser.
[00:06:28] And in exchange for that, Sun will drop their hot java browser, which wasn't very complete anyway. So Chuck, that's easy to agree to. Step number two, Sun says you have to kill LiveScript because that's an embarrassment. We're seeing that Java is the last programming language you'll ever need.
[00:06:48] You can't then also be introducing another new language you're just making us look at that. So kill it. Netscape refused to kill it for two reasons. One is they wanted a language for beginners and Java and that language you need a lot of specific knowledge about Java just to write hello world.
[00:07:06] They wanted something with a much lower barrier to entry but there's also a practical problem. They wanted to launch the new browser right away and so the way they put Java in was they had Java talk to LiveScript through an interface called LiveConnect. So LiveScript could talk to the browser Java can talk to LiveScript through LiveConnect and if they took LiveScript out, Java wouldn't work.
[00:08:02] And that they position it not as a new language but as a subset of Java, interpreted Java, which was silly because Java was interpreted Java. It was Java's stupid little brother. So they went out and held a press conference in which they lied about the relationship of these two languages.
[00:08:22] And echoes of that lie still reverberate pretty loudly through the Internet. Meanwhile, Microsoft has noticed that there are these two companies in California that are getting ready to destroy Microsoft. And they weren't ready for that yet. So Microsoft had completely missed the web in the Internet. They thought the future of telecommunications was going to be fax and cable TV.
[00:09:05] Now it turns out ten days is way too short a time to design and implement a programming language, and there are lots of errors, lots of bugs, lots of design defects, lots of blunders. The Microsoft team discovers and carefully documents all of them and replicates them. Now usually, when Microsoft goes to knock something off, they can't help doing their own thing to it.
[00:09:31] For example, when Bill Gates told them I want a Macintosh they built Windows, okay? He didn't ask for Windows he asked for Macintosh and that's how goes there but on this case they got it exactly right. And in fact, they were able to keep the write once run everywhere promise that Java was failing to keep.
[00:10:40] What are we gonna do? We need to make a standard, so they went to W3C, and said, W3C, we have developed a programming language for the web. We'd like you to help us make it a standard. Now turns out W3C had been waiting for a chance to tell Netscape to go to hell.
[00:10:57] So they told Netscape to go to hell. So Netscape then went to ISO. Eventually they end up with the European Computer Manufacturers Association. Which is a long way to go for a California software company. But ECMA agrees, yes we'll help you make a standard. So they convene a committee.
[00:12:35] Before that one was finished work began on a fourth edition which went on for ten years and was abandoned. In 2009, a fifth edition was published which defines two languages, a Strict and Default, we'll talk more about that dialect this afternoon. And then recently, the sixth edition was published and which will eventually find its way into browsers, we'll talk more about that on the third day.
[00:13:49] And then haste, ten days is just way too short a time to design and implement a programming language. Brendan did not intend for his proof of concept to be shipped as a product but Netscape did that. I think that was inexcusable and he suffered for that. It was an unfortunate thing, so for the most part are give you a comparison.
[00:14:16] Maybe the best designed programming language in history was Smalltalk 80. Xerox PARC spent a decade designing, refining, testing, improving that language. They spent almost as many years as Netscape spent days in assigning the language. And I think Xerox got it right even though the community did not agree.
[00:14:43] So for the most part the bad parts can be avoided which is great. The problem with the bad parts isn't that they are useless it's they are dangerous