[00:00:52] So the old timers might remember Mosaic. It as the first popular web browser developed at the University of Illinois by a bunch of kids there and many of who are now extremely wealthy. They went off and some of them started a company called Netscape, which made the first mass market browser.
[00:01:14] Their plan was to produce a browser, get everybody to use it and then start charging $30 a year use it. Their ultimate plan was that everybody in the world would give them $30 a year and that probably be okay.
>> Douglas Crockford: But it didn't work out that way.
[00:01:34] So before then, Bill Atkinson at Apple developed something called HyperCard. At that time, Apple was struggling with the macintosh platform. They were having a difficult time convincing developers to write for it. The difficulty was that macintosh required an event driven programming model, which was the opposite of what programmers were used at that time which was a conventional blocking on read architecture.
[00:02:07] And they look at the mackintosh and said, we can't write for that, it's all inside out. It's too hard. Wow, we can't do that. Atkinson designed this whole thing called HyperCard. Took MacPaint and allowed you to paint on several layers, and just lay any layer at one time.
[00:02:23] We called that a card and you could attach to those cards buttons, and fields, and attached to those event handlers which could read things like on-click and on-mouse up and things like that. And added a friendly little scripting language to make that easy to do and beginners loved it.
[00:02:46] They had no idea that this style of programming was hard, nobody told them. So they wrote amazingly sophisticated applications in HyperCard. And eventually the professional developers say, well, if they can do it, I guess we can do it. And eventually took off in Macintosh in the Windows and everything after that, but it sort of started here.
[00:03:07] And so the guys at Netscape thought, they wanted a similar kind of capability in the Netscape browser should be called Navigator. That beginners could very easily take a web page, put some buttons and fields on it and make it interactive and they got this guy to do it.
[00:04:22] Carl Hewitt is this amazingly smart guy who got all excited about actors as a new paradigm for how programming should be done. I think Carl was right, but there are other guys at MIT who just couldn't understand what Carl was talking about. And so they decided to write a Lisp dialect that would demonstrate some of good things Carl is talking about.
[00:04:43] And in the process, they accidentally invented Scheme. The best part of Scheme was functions has first class objects with flexible scoping which hadn't been done before and was brilliant, but the mainstream never bought into it, because Lisp always had all those parenthesis. And at least when you're beginning, you have to count them all and mainstream developers just had no tolerance for that so it went nowhere.
[00:05:34] He didn't tell anybody that he had done that amazing, then Self was another research language being developed at Xerox PARC. Self was a dialect of Smalltalk and they wanted to make Smalltalk more expressive, easier to program, more dynamic and faster to implement and they did that by removing classes from Smalltalk.
[00:06:03] Smalltalk was the first main stream object computer programming. They took the classes out instead had objects inherit directly from other objects. Removed a big level of interaction in the process, came up with a language which could be much faster. And more importantly, much more expressive. So it became much easier to write highly dynamic programs in this language.
[00:06:25] Brendan took that another feature from an ignored research language and stuffed it into a language for beginners. Amazing and it turns out the interaction of those two features, having dynamic prototypal objects with functions as first class objects. Putting those together was astonishingly smart. And so we ended up with something that at the time we called LiveScript.
[00:06:53] Now at that same time in history, Java was taking off. In 1995, Java was the biggest thing ever to happen in the industry of software. Java applets were going to rule the world. Some promised that Java applets would liberate us from Microsoft, because we would write to the virtual machine not to the operating system.
[00:07:16] And therefore, we could get off of Windows and be free and there's a lot of interest in that. At the same time, Netscape was making a similar promise that we'll target all applications to the browser. The browser is OS independent. We'll be liberated from Microsoft. Together, we will destroy Microsoft and Netscape realized that they needed to form an alliance.
[00:08:05] So it's really embarrassing to have this other language in there, which isn't Java. We can't explain that, that doesn't make sense of get rid of it. Netscape couldn't do that. Because for a couple of reasons, one was a technical reason. And so they had this crappy DOM in there.
[00:08:23] It was called DOM zero or later became called zero and LiveScript was able to talk to it and do stuff to it. Java couldn't. So the way Netscape figure out to get Java in there fast was to create a bridge LiveScript and Java called LiveConnect. And that was a little API that allow the script language to see Java objects, so they can kind of push the stuff back and fort, that was the only mechanism by which Java could communicate with the browser.
[00:08:55] And they didn't have time to rearchitect that and take it out and create a new DOM, specifically for Java. The other reason was they wanted a language that beginners could use and Java is not that language. You have to have a lot of knowledge about Java in order to write hello world.
[00:09:36] And that the position it as a subset of Java, a scriptable Java. Java's stupid little brother interpreted Java which is crazy, because Java once interpreted Java. So they went out in public and they lied. They lied about what this programming language was and what it's relationship to the world was gonna be.
[00:09:58] Now through all of this, Microsoft started to notice there are these two companies in California that are about to destroy Microsoft. So we need to look into this. At that point in time, Microsoft's opinion of the future telecommunications was fax. So they completely missed the web. And so when they saw Netscape's during the heat up, they decided, okay, we need to get into the we business.
[00:10:53] They looked very carefully at what had done and found every error, every design defect, every mistake, carefully cataloged them and replicated them. Usually Microsoft can't resist doing things the Microsoft way. But in this case, they went the high fidelity way which is why we're here. Cuz if they had done what they usually do, there would have been no compatibility between the two and the language would have died, but they didn't.
[00:11:44] So Microsoft decided to call it JScript. So then it got taken to Netscape. I don't know we're gonna get embraced and extended, so need to get a standard to keep Microsoft in check. So they went to W3C. So W3C, we developed this language for the web. We'd like you to standardize it and it turned out W3C had been waiting for a chance to tell Netscape to go to hell.
>> Douglas Crockford: So they told Netscape to go to hell. So Netscape shopped around looking for another standards body they tried ISO. Eventually they ended up at the European Ccomputer Manufacturers Association and which has a long way to go for a California software company, and ECMA agreed to to create a standard.
[00:12:30] So they convened a committee and Microsoft join the committee, and Microsoft dominated the committee. So when questions came up like Brendan wanted to fix the double equal operator, he thought as long as we're standardizing, now is the time to fix it. Microsoft said, no. All of those defects have been so carefully cataloged and identified, and replicated are now locked into the standard.
>> Douglas Crockford: So the language that is an IE6 was the third edition, which was published in 1999. The fifth edition didn't come out til ten years later, the fourth edition was abandoned and it was never approved. That's a long time between editions, but it turned out that was really good.
[00:14:00] Because joining the browser wars, the web as a platform was a extremely unstable. Netscape and Microsoft were pumping bugs into the web at a furious rate, and it was really hard for developers to keep up with that. Also bugs tended not to disappear, they would just get added on to.
[00:14:44] And so in 2005, it was possible for AJAX to take off, because the language had sat around for so long. So the new language defines actually two languages. There's a default language and a strict mode. And I recommend that in the short-term, if you have to run an IE6 or anything before IE10.
[00:15:09] They will be working in the intersection of ES5 and Strict. That turns out that's multiple language. So that's a pretty easy place to live. In the long-term, you wanna be working in ES5/Strict, because that's gonna be the future of the language. The next edition will be built on top of that.
[00:15:48] When we see those mistakes in Java for some reason, they just seem nastier. Also there are a lot of good intentions that Brendan put in very quickly like semicolon insertion and the width statement which turned out not to be good, and there's a lot of that in the language.
[00:16:06] We'll be talking a lot about that. But mostly, it was haste. I mean, he had ten days to figure this stuff out. In contrast, Smalltalk which was developed at Xerox Parc, they spent almost as many years as Brendan spent days in this design and perfecting of that language.