Lex Fridman PodcastBrendan Eich: JavaScript, Firefox, Mozilla, and Brave | Lex Fridman Podcast #160
EVERY SPOKEN WORD
150 min read · 30,122 words- 0:00 – 1:53
Introduction
- LFLex Fridman
The following is a conversation with Brendan Eich, creator of the JavaScript programming language, co-founder of Mozilla, which created the Firefox browser, and now co-founder and CEO of Brave Software, which has created the Brave browser. Each of these are revolutionary technologies. JavaScript is one of the most widely used and impactful programming languages in the world. Firefox pioneered many browser ideas that we love today, or even take for granted today. And Brave is looking to revolutionize not only the browser, but content creation online and the nature of the internet to make it fundamentally about respecting people's control over their data. Quick mention of our sponsors. The Jordan Harbinger Show, Sambasket meal delivery service, BetterHelp online therapy, and Eight Sleep self-cooling mattress. Click the sponsor links to get a discount and to support this podcast. As a side note, let me say that there's a tension between theory and engineering that I've been thinking a lot about. I tweeted something like, "Good execution is more important than a good idea, but one helps the other." I think the wording of that sucks, but what I mean is a, a good idea is a must, but in my experience, good ideas are in abundance. Good execution, on the other hand, is rare. I think some mix of good timing, good idea, and good execution is essential. Getting that mix right is tough, and (laughs) Brendan somehow, multiple times in his career, did just that. I'm starting to believe it's more art than science, like most interesting things in life. If you enjoy this thing, subscribe on YouTube, review it on Apple Podcast, follow on Spotify, support me on Patreon, or connect with me on Twitter @LexFridman. And now, here's my conversation with Brendan Eich.
- 1:53 – 6:46
History of early programming languages
- LFLex Fridman
When did you first fall in love with programming?
- BEBrendan Eich
I didn't program a lot when I was in high school, but I had a friend who had a Commodore PET. And after we saw Star Wars, he said, "Hey, let's make a, a basic, uh, program that does the Death Star trench run."
- LFLex Fridman
(laughs)
- BEBrendan Eich
And it was just, you know, simple 2D graphics. And I didn't know what I was doing, so I just helped him out, uh, on the math and stuff like that. I was a math and science kid. I was really into, uh, the HP calculators of the early mid-'70s. These were the RPN. They were really strongly built, and as Rik Goldfinger said of gold, "divinely heavy" (laughs) .
- LFLex Fridman
(laughs)
- BEBrendan Eich
There was probably some gold in them, too. Gold metalization. But they were awesome calculators, and they had all the scientific functions, so I was really into that. Um, so I, I aimed toward physics. Um, I was a little late for the, I think the, you know, the 20th century golden age, and I read a lot of science fiction, so I was like, "Yeah, it's on to hyperdrives and warp drives and..." Uh, physics was not going to get there quickly, and I started hacking on computers while I was studying physics as an undergraduate at Santa Clara University. And, um, you know, it... I, I dodged the Fortran bullet because I was in the science department instead of the engineering department, where they still did Fortran, card decks, I think they had an auto collator. But, uh, we were using Pascal, and, uh, I got one of the first portable C compilers, uh, ports to the deck minicomputers we were using, and I, I fell in love with programming just based on, um, you know, procedural abstraction, uh, Pascal, just what now would be considered old school, like, structured programming from the '70s. Um, Niklaus Wirth, the creator of Pascal, was a good writer and a, a good pedagogue, right? He al- always, at ETH, would do these courses where it's like, "Build your own computer."
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
"Build your own compiler, build your own operating system."
- LFLex Fridman
From scratch, mm-hmm.
- BEBrendan Eich
Yeah, kind of. And, uh, (laughs) I know some people who were grad students under him and said he was, um... he would torture the students with things like this custom email system that had a 25-word limit. (laughs)
- LFLex Fridman
(laughs)
- BEBrendan Eich
And, uh, things like that.
- LFLex Fridman
I unfortunately dodged both the Pascal and the Fortran bullets.
- BEBrendan Eich
Mm-hmm.
- LFLex Fridman
Uh, could you maybe, uh, linger on, uh, the Pascal? Like, what kind of programming language was it? What, what is it reminiscent of of today? Because it sounds like it may have had, uh, an impact on your own tr- trajectory.
- BEBrendan Eich
Yeah. Yeah, it was in the ALGOL family, and ALGOL was, um, you know, the big, uh, successful, uh, language design and compiler project in the '60s. It had a successor called ALGOL 68, which was ambitious but not as successful. But Pascal was kind of a wordy procedures and functions language. It distinguished between functions, which return a value, and procedures, which don't-
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
... which just compute. Uh, and, uh, you could say that whole ALGOL family went into Ada. Um, Pascal had a second life thanks to Borland with Turbo Pascal-
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
... which was hugely successful, uh, I think in large part due to Anders Hejlsberg, who then went to Microsoft and did-
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
... you know, C# and .NET-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... with his team there and has done really well doing TypeScript, typed JavaScript. Uh.
- LFLex Fridman
(laughs)
- BEBrendan Eich
So yeah, there's a, there's a lineage here. Uh, but I was also interested in C and Unix by the time I was an undergrad, because, uh, people were bringing Unix up on all sorts of hardware. I had some friends who were doing their own wire wrap computers, 6820 maybe, um, and I was wire wrapping for my engineering course, um, 6809 or something simpler, building a computer on a board. And I wanted to build a more ambitious one and port Unix to it, but I picked the wrong processor. I picked the National Semiconductor NS16032, which was this amazing, you know, CISC con- uh, complex instruction set computer, and not the reduced instructions that computers... that were just being contemplated into the mid-'80s. Um...
- LFLex Fridman
And RISC ultimately won out.
- BEBrendan Eich
RISC won in some ways. It, it dissolved into the... You have both now. You have these superscalar architectures where, like, Intel has kept...... probably too much backward compatibility at the instruction level, but that's just the... There's a front end that parses that into these, you know, these wide internal instructions. So, you know, the very long instruction word research that, um, was also interesting at the time kind of became the microarchitecture inside the backward-compatible Intel. Um, but I picked the National Semi Chip, and it never got made successfully. It was full of bugs and I never could have brought it up. But I went on, uh, out of physics after three years into math computer science. And like I said, I did it because I saw, um, I was being sort of childlike and naive about physics, and I thought, uh, "Meanwhile, the valley is, is go-go for computers." The Apple II, right, the, the PC, the Intel, um, 8086, um, 8088-based PC. IBM, you know, gave Microsoft the future for (laughs) -
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
... in a somewhat fishy deal.
- 6:46 – 11:23
Physics needs more experiments and less theory
- BEBrendan Eich
- LFLex Fridman
So, it was wide open in the computing space, but in physics, you, you were as, uh, optimistic about physics as
- BEBrendan Eich
No. ... that was reported to be. I mean, I was one of three brothers who were all in the same grade. I have a twin and a younger brother who, um, skipped second grade and was with us the whole time after that. And, you know, he went on, he actually studied under Kip Thorne at Caltech.
- LFLex Fridman
Wow.
- BEBrendan Eich
Uh, but he also didn't... He ended up in software engineering (laughs) .
- LFLex Fridman
(laughs)
- BEBrendan Eich
He didn't end up in physics, so.
- LFLex Fridman
All right. Does it make you sad that, uh, theoretical physics, even with string theory, hasn't really had any foundational breakthroughs in the latter part of the 20th century and, uh, into the-
- BEBrendan Eich
Yeah. In fact, I'd say the problem is theory over, over experiment. I would say, you know, we need more Aristotle and less Plato.
- LFLex Fridman
(laughs)
- BEBrendan Eich
You know, mathematics is not all physical.
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
There are lots of mathematics that cannot be realized as far as I know in, in this world. So, to understand the world, you need to do experiments, you need to, you know, not just dream up, uh, inductive theories that could have lots of alternative theories competing with them, with no way to decide between them except aesthetics, which is not a good guide, in my opinion.
- LFLex Fridman
I don't know if you, uh, are friends with or have a relationship with Elon Musk. Where's the, um... In terms of, like, what you would love to see our society investing in, building up, is it closer to Elon or is it closer to Feynman and Einstein and those-
- BEBrendan Eich
Well, those gentlemen are no longer with us, and I think-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... that's noticed. So, like I said, the real glory days of physics, the famous pictures from Germany before the war- second world war were, uh, just a fantastic assembly of brains, um, you know, Schrodinger and Einstein. And, and physics, I think, took a wrong turn that maybe all, all of, um, I would say Western science took in going for models over reality, right? You see this in all sorts of fields. Now, we can build models that are very predictive and generative, and then we build actual devices or, you know, semiconductors, things like that. That's, that's good. I'm not dismissing that. Uh, we need good models. We need to experiment and prove them and, and test them. But the problem I've seen in physics, which you see certainly in economics, um, the dismal science, and you see surprisingly in other so-called hard sciences, is models that, um, don't really have to be, um, tested against reality. They can instead become policy tools or they can become, uh, like I said, uh, one of a large family of alternate theories that could be as predictive, but nobody's doing the-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... winnowing out.
- LFLex Fridman
That's such an interesting tension in society. You see this in even the softer sciences, which I have a deep love for, like psychology, you see this in epidemiology now with the virus.
- BEBrendan Eich
Yeah. Absolutely.
- LFLex Fridman
It's this tension of, you know, how much of the world can we understand through just a beautifully fit model? And then at the same time, my main work is in machine learning-
- BEBrendan Eich
Mm-hmm.
- LFLex Fridman
... where it's like there is no provable thing usually. It's just, it's kind of you... It's all about just getting the right data set and getting tricks and so on.
- BEBrendan Eich
Mm-hmm.
- LFLex Fridman
And there's this tension even in my own soul of like, I grow- I grew up on theoretical computer science, like, I loved, uh, uh, approximation algorithms, like, all of that, like, different complexity classes-
- BEBrendan Eich
Mm-hmm.
- LFLex Fridman
... just those little puzzles. I mean, I don't know. Do you, do you as somebody who was in math and computer science and then ended up going into places where you engineer some of the most impactful things in this world, do you see the P versusNP, all that whole space as interesting at all? Impactful?
- BEBrendan Eich
Yeah, uh, it's, it's not that useful in practice, right? People are using it, uh, with sort of crypto analysis or asymptotic arguments about, you know, can, can we have a quantum-resistant crypto algorithm, things like that, which may not be practical, right? If you, if you follow Mikhail Diakonov or Gil Kalai, there, there are big questions about how health quantum computing will scale up. Um, how practical it will be.
- LFLex Fridman
Is that something that you think about, quantum computing, and, and-
- 11:23 – 36:16
JavaScript origin story
- BEBrendan Eich
- LFLex Fridman
So, speaking of things that, uh, didn't follow a perfect theory and model, uh, JavaScript.
- BEBrendan Eich
(laughs)
- LFLex Fridman
So there's two things. One, it had an impact on the world at a huge scale, obviously.
- BEBrendan Eich
Mm-hmm.
- LFLex Fridman
And it also still is one of probably the most popular programming language in the world. So, can we go back to the origin story? Uh, can you tell the story of how JavaScript was created?
- BEBrendan Eich
Yeah. I was at Silicon Graphics after graduate school for seven years, and it got to be big and successful and divisionalized and political. And-... I thought, um, kind of boring, and a friend who had been there went to, uh, one of the last of the super companies, the super startups in, in the early '90s. There were several. I suppose General Magic was a little after that, or around the same time, but Microunity was that company that I went to and it was because my friend, uh, Jeff Weinstein had gone there from Silicon Graphics. He recruited me and Microunity was doing everything. So this, this was like the ultimate sort of pretend grad school. It was doing a new fab, new semi-
- LFLex Fridman
Wow.
- BEBrendan Eich
... connector process. It was doing new, um, analog and digitals circuits on the same very large but not wafer s- scale chip. Um, originally it was, um, five centimeters on its side. (laughs) It was, it was really hot too, so it needed a water cooler. Um, it was a crate killer. And then they shrunk it and they tried to do a, a home sort of media processor that was essentially a barrel processor, but you could think of, um, trying to do all the things that we now see in modern architectures, uh, with short vector instructions and, um, sort of wide instructions for multiple issue. Uh, and, and doing a lot of this stuff in software because the second iteration, the set-top box, was really for avoiding the cost to the cable company of rolling the trucks out to replace your garbage General Atlantic set-top box with the slightly newer, less, less, uh, garbagey one. So if you could have software upgradable, um, set-top boxes, the cable companies, uh, thought they could save a lot of money and add features.
- LFLex Fridman
Is this Assembly? Or which, which-
- BEBrendan Eich
It was like-
- LFLex Fridman
... level of the software?
- BEBrendan Eich
It was like S- ... We were writing in, in, um ... We were using GCC where we were getting to C++ and C. Uh, somebody I, I worked with there, um, really very smart guy, hired from a sort of Wall Street, um, hotshot programming consultancy, did his own hardware design as well as software, and we were working on how to make, uh, not only short vector units but general bit shufflers and permuters so that you could do things like, um, uh, you know, crypto-algorithms efficiently and you could do, uh, demodulation of the cable, you know, complex, uh, quadrature amplitude modulated signal. So you were, you were ta- basically taking, uh, A to D converters, dumping things in buffers, and then doing the rest in software, all the framing and the Reed-Solomon and Viterbi and all that error correction. So that was really great learning experience, but it was not gonna work. It was doing too many risky things at once, right? If you ... As Jim Clark said to me when I had hopped to Netscape after three years at Microunity, he said, "Oh, yeah, you do 10 things each, uh, 1 in 10 odds, it's gonna be 1 in 10 billion," right?
- LFLex Fridman
(laughs) Yeah.
- BEBrendan Eich
Um, the multiplication principle. So, you know, Netscape was already a rocket and I'd passed the chance to go there in 1994. I knew the founders because I worked at SGI, Clark's company-
- LFLex Fridman
Could you pause for a second-
- BEBrendan Eich
Sure.
- LFLex Fridman
... Netscape, uh, w- when was the launch of this rocket? What, uh, just-
- BEBrendan Eich
'94, um-
- LFLex Fridman
'94 was the launch of Netscape?
- BEBrendan Eich
Yeah. And I went there in early '95, in April.
- LFLex Fridman
Okay. But, uh, so you said you missed the launch of the l-
- BEBrendan Eich
Well, I missed the, the en- the first floor employment opportunity, but the IPO was, was August 1995, so I was there for that.
- LFLex Fridman
How obvious was it that Netscape was like world-changing? Uh, what was the layout? Was Netscape one of the first big browsers?
- BEBrendan Eich
Yes. So wh- when I was at Microunity still in '93, we saw a browser called Mosaic. And up 'til then, we'd used email and we'd used Usenet, the NNTP protocol, we'd used newsreaders, we used FTP, we used all these old internet protocols, all relying on the DNS and TCP/IP and UDP for that matter. Um, when I was at Silicon Graphics, we brought up the whole stack, right? We had to, you know, discover how, how to f- find the Ethernet addresses on your network and then find IP addresses for them, ARP protocol, all that stuff. And it was great because nobody knew in the '80s what was gonna win. All the proprietary stacks like IBM, SNA, and DECnet, and all these other protocols were saying, "It's- we're gonna do it," or, "It's gonna be a heterogeneous future." And instead it was, you know, Berkeley Unix and the TCP/IP stack that dated back to the ARPANET that won. And I think we knew it. We all knew it at, at SGI but the salespeople didn't, and so they kept trying to get m- multiple network stacks inter-operating. But in the end, uh, it won. And so it ... That was the internet, and it was email and text-y, and it was Usenet, very text-y.
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
And then, uh, Tim Berners-Lee did his thing, but I don't think I was paying attention. And I think the date when he first did it, or when he wrote the famous email has been pushed back to '89. But I noticed, uh, Mosaic in '93 because one of the things that Marc Andreessen and Eric Bina did at NCSA was they innovated on, on the HTML s- early HTML standard. They, in particular, Marc sent this email saying, "Hey, everybody. We think you should be able to put an image in a page." And you know when he sent that, Eric Bina had already written the code. And, you know, I talked to Tim Berners-Lee more recently, just a few years ago, and he was like, "Oh, we had another way of doing it and then, uh, d- it didn't work out 'cause Mark shipped his in Mosaic." And this convinced me of several things. One, the internet meant there was a huge first-mover advantage, and being fast, getting on first mattered a lot. And so, you know, Richard Gabriel of Scheme and poetry fame has written about this, the famous essay-
- LFLex Fridman
Poetry? What's poetry?
- BEBrendan Eich
Uh, well, he's a poet. Uh, Richard's a poet. Yeah.
- LFLex Fridman
Oh, actual poetry. I thought he was talking about some kind of sonnet. Okay.
- 36:16 – 45:56
JavaScript was created in 10 days
- LFLex Fridman
(laughs) it's a special moment in the history of all of computing. It's, uh, we'll talk about it later, but it's arguable, it's possible that the entirety of the world will run on JavaScript at some point. (laughs)
- BEBrendan Eich
Yeah. (laughs)
- LFLex Fridman
So like, it, it's like those are, those days, it would be, it would be interesting if you could just describe-... actually zooming in on the how the cake was baked, uh, from the, you know, the- the several days that you were working on it, what was in your mind, uh, how much coffee were you drinking?
- BEBrendan Eich
(laughs) Yeah.
- LFLex Fridman
Were you nervous? Why, uh, freaking out?
- BEBrendan Eich
I'll try to remember it. I mean, you're right. There were these pregnant moments you see in hindsight, maybe they're overrated. But like, Hegel sees Napoleon on horseback-
- LFLex Fridman
Right.
- BEBrendan Eich
... at Yena and says, "There's the world's spirit-
- LFLex Fridman
(laughs)
- BEBrendan Eich
... uh, on- on horse." Um, and, uh, I knew that there was a chance to do it. Mark knew, and he was my, um, you know, executive sponsor and he was the one, you know, sort of brainstorming how the JavaScript should be right there in the page. That was important for him to say that, 'cause I- I thought so too, but a lot of people were like, "Oh, you can't write programming language in the middle of the markup."
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
And indeed there are problems. If you did it naively, you'd see the code laid out as like-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... random gibberish. So I had to figure out how to hide that, and that was a challenge.
- LFLex Fridman
Wait, is that- is that a breakthrough idea? I mean, so you and Mark thinking about this idea that you just inject code in the middle of the markup?
- BEBrendan Eich
Of the webpage? Yeah, it was considered kind of heretical. There was an SGML guru, I forget his name, but he corresponded with me. And at first he was angry. He's like-
- LFLex Fridman
(laughs)
- BEBrendan Eich
... "You- you should've used a marked section. Why didn't you use a marked section?"
- LFLex Fridman
Yeah.
- BEBrendan Eich
And I said, "Well, SGML marked sections are not part of HTML by the way, and they're not supported in the browser."
- LFLex Fridman
Yeah.
- BEBrendan Eich
And so I- I did some hack that was equivalent, and over time you could do the proper SGML thing. But he eventually came around and it- it was again sort of an evolutionary necessity. It was almost like introgression, like- like, you know, the idea, um, which Lynne Margulies, I think helped get across that, uh, we have to consider mutualism in biology that maybe, you know, mitochondria were ancient, uh, prokaryotes that got into s- the cell and became-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... beneficial.
- LFLex Fridman
Yeah.
- BEBrendan Eich
Um, somehow, uh, the- the same sort of thinking applies, uh, you have to embed JavaScript in HTML. It- it's gonna be a good virus (laughs) . It won't hurt you.
- LFLex Fridman
So the code, uh, the code becomes data in a sense, it just gets carried, uh, car-
- BEBrendan Eich
It gets carried.
- LFLex Fridman
... car- carried along. But-
- BEBrendan Eich
Yeah.
- 45:56 – 49:13
Marc Andreessen
- BEBrendan Eich
- LFLex Fridman
Just on a small tangent, you mentioned Marc Andreessen. It sounds like, and Bill Joy, but staying on Marc, it sounds like he had an impact on you in that he sort of believed in what you were doing there.
- BEBrendan Eich
Mm-hmm.
- LFLex Fridman
Can you, can you talk about, like, what role Marc had in your life?
- BEBrendan Eich
Yeah, we, we would meet at the, um, the Pensula Creamery in downtown Palo Alto. And Marc was just fresh out of, you know, grad school or whatever he was doing, and he was big dude, and (laughs) he got fitter later. Uh, he had hair. He, he would order giant milkshakes and burgers. And we would meet there and brainstorm about what to do, and it was very direct because we didn't have much time. The f- the... Sort of, we didn't talk about it, but the implication was Microsoft was coming after us. Marc was saying things boldly, uh, pre-IPO, like, "Netscape plus Java kills Windows," right? This was-
- LFLex Fridman
Wow. It's ambitious.
- BEBrendan Eich
Make, make a browser programmable, it becomes the new runtime for programs.
- LFLex Fridman
Wow.
- BEBrendan Eich
You don't... It's the meta OS or it's the replacement OS. Um...
- LFLex Fridman
But he still saw value in JavaScript.
- BEBrendan Eich
Yes. Bec- even though he was saying that, and Java was the big name, hence the trademark license, uh, he saw JavaScript as important. And he even thought, "What if we got..." (laughs) I told this in other interviews so I can say it. He thought, "What if we had..." Uh, my friend Kip Hickman, who'd been at Netscape from the beginning and who was a kernel hacker at SGI when I joined, he started writing, uh, his own JVM before we consummated the Sun deal and got our hands on their code. And the Java compiler, Java C, which, uh, Arthur Van Hoff had written very nice code, was all written in Java. It was self-hosted or so-called bootstrap.
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
And so we could use that as soon as Kip's Java VM could run the byte code, eh, from the J- the Sun, uh, JVM running j- the, the self-hosted compiler to emit the byte code. So once we could bootstrap into Kip's VM, we wouldn't need Sun, and Marc was like, "Well, maybe we can just d- you know, ditch Sun, we'll have Kip's Java VM, we'll have your JavaScript VM." We... Well, now we need graphics. So Marc was thinking far ahead because he knew you could do things with HTML and images, but at some point you really want this-
- LFLex Fridman
Like, dynamic graphics or three-dimensional?
- BEBrendan Eich
Yeah, like, like, even SGI had already started its downfall because the first floor DLSI team there had gone off to do 3Dfx and all these other companies that made the graphics card on your PC, right?
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
Doom was, was big, and Quake, and so you were, we were all playing Quake. I was old, so I was terrible. Um, but-
- LFLex Fridman
(laughs)
- BEBrendan Eich
... why not put that graphics capability on the web? And in fact it finally happened, uh, at Mozilla with Firefox era with, uh, Vlad Vunkic. Taking OpenGL ES and reflecting it as WebGL. But OpenGL ES is the mobile version of OpenGL, which is a standard based on SGI GL. So there's this whole lineage of graphics libraries or really graphics languages for the, what became the GPU, and Marc was thinking ahead. He's like, "We need graphics too," and I thought, "Okay, I can, I can try to get somebody I knew at SGI," but he's a grad student at MIT. He was studying under Barbara Lisakov. He laughed when he heard about this later. Andrew Myers, he's at Cornell long time. I think he's a full professor. And (laughs) Marc said, "Great, we'll get him," and I thought, "I'm not sure he's gonna come. We'll throw money and we'll stock options." We never did it. And they did the Sun deal, so Kip nobly put aside his own JVM and we used the Sun JVM. So that was an ambitious period, and Marc was very generative because he was pushing hard, he was ambitious, and he wanted to have Netscape at-... possibly be in control of the ball.
- 49:13 – 52:57
Internet Explorer
- BEBrendan Eich
- LFLex Fridman
Maybe you can speak to the, this dance of, uh, Netscape versus Internet Explorer.
- BEBrendan Eich
Mm.
- LFLex Fridman
You've, uh, you've, uh, thr- thrown some loving words towards Microsoft throughout this conversation, but that's a theme with, uh... I mean, Steve Jobs had a similar sort of commentary. From a big sort of philosophical principle perspective, can you comment on, like, the approach that Microsoft has taken with Internet Explorer from IE1 to Edge today? Is there something that you see as valuable that they're doing in the, in the occasional copying and that, that kind of stuff? Or is it, um... Is the world worse off because Internet Explorer exists?
- BEBrendan Eich
So, I- I'm gonna segment this into historical eras, because I think Microsoft of today with Satya is quite a different company.
- LFLex Fridman
Yes.
- BEBrendan Eich
And what they're doing with Edge is different. But back then, um, Gates, you know, aggressive character, not really original in my view, (laughs) uh, not an originator. Steve Jobs famously said once, "He doesn't have any taste. And I don't mean this in a small way."
- LFLex Fridman
(laughs)
- BEBrendan Eich
"He has no taste." Uh, you can see this, right-
- LFLex Fridman
(laughs) Boy.
- BEBrendan Eich
... with Apple at the time had-
- LFLex Fridman
(laughs)
- BEBrendan Eich
... had beautiful typography and, you know, ligatures and kerning and the fonts looked great.
- LFLex Fridman
Yep.
- BEBrendan Eich
And Windows had this sort of ugly system font that was carefully aligned with Pixel so it didn't get anti-aliased.
- LFLex Fridman
Why, why, why is it... I'm sorry to keep interrupting, but why did, why was Internet Explorer winning throughout the history of these competitions?
- BEBrendan Eich
Distribution. Distribution matters-
- LFLex Fridman
Ah.
- BEBrendan Eich
... more than anything. And this is why, um, you know, even now we're seeing the browser wars, Edge doing better, because it's being foisted on people who have Windows. We have Windows 10 boxes at home. We have some Windows 7 boxes we, or laptops we keep running too, because we, we don't connect them to the internet generally. But, um-
- LFLex Fridman
(laughs)
- BEBrendan Eich
... but, but, uh, once you have that operating system to-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... hold, you can, you can force, you know, Edge.
- LFLex Fridman
Yes.
- BEBrendan Eich
And, and Apple did it with Safari too. It's not unique to Microsoft.
- LFLex Fridman
That's sad in a way.
- BEBrendan Eich
But, uh, distribution matters, and that's why, uh, I think IE was going to win, and that's why everybody at Netscape felt we're doomed. This was something Michael Toy and Jamie would say, "We're doomed." Um, but for a while there, we had a chance and we innovated in Netscape 2.0. We did the big platform push, Java and JavaScript and, uh, plug-ins, more plug-ins and, um, you know, more HTML table features and, and really started making a programmable stack out of what were pretty static web languages.
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
And even in the beta releases of Netscape 2.0, people were using JavaScript to build what you would call single-page applications, like Gmail.
- LFLex Fridman
Mm-hmm.
- 52:57 – 58:43
Evolution of JavaScript
- LFLex Fridman
So, how is the... If you can do sort of a big sweeping progress of JavaScript, how has JavaScript changed over the years in your view from those early 10 days with the quick add- addition of garbage collection and fixes around security? How has this evolution that now it's taken over the world?
- BEBrendan Eich
It, it... In this... It- it's been a bumpy ride, because the standards body got shut down after Microsoft, I think, um, took over the web and then felt punished by the US v. Microsoft antitrust case.
- LFLex Fridman
Can you speak to the standards body? Like-
- BEBrendan Eich
(laughs) That was a fun ride too, because Netscape had, uh, taken the lead with the web and HTML innovations like, um, frames and frame sets, tables, and the W3C was sort of off even then sort of in SGML land heading toward XML la-la land (laughs) . I'm gonna be a little harsh on it, because-
- LFLex Fridman
What's SGML? I'm sorry.
- BEBrendan Eich
SGML was the, the precursor markup language to HTML. It- it was sort of the more extensible, um, standard-
- LFLex Fridman
So some mix of X-
- BEBrendan Eich
... generalized markup language. It was, it was a-
- LFLex Fridman
XML-like, like-
- BEBrendan Eich
... pointing brackets, but it had-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... all sorts of elaborate syntax for doing, uh, different semantics. And this is why I think, uh, you know, TBL and others who wanted to do this semantic web then took XML, um, forward. But they had this, uh... Or some of them anyway, had this strange idea they could replace the web with XML or that they would upgrade the web to be XML, and it couldn't be done. Uh, worse is better had concrete meaning. The web was very forgiving of HTML including sort of minor syntax errors that could be error corrected. Like, error correction isn't generally done in programming languages because-
- LFLex Fridman
Right. That's another amazing thing about HTML is, like, it's more like biology than programming.
- BEBrendan Eich
Yeah. Exactly.
- LFLex Fridman
(laughs)
- BEBrendan Eich
And, and so, uh, XML was, in its standard form, super strict and could never have admitted, you know, the kind of users who were committing these errors. And the funniest part was Microsoft said, "Hey, we're doing XML," but the way they put it in Internet Explorer under the default media type put it through the HTML error corrector (laughs) .
- LFLex Fridman
Oh, wow.
- BEBrendan Eich
So, they kind of bastardized it to make it popular and usable and accessible. And so XML as a pure, um, you know, thing was never gonna take over. Um, and the W3C was kind of not fully functional because Netscape wasn't co- cooperating with them. We thought about where to take JavaScript, and we realized... Our standards guru, Carl Cargill, realized there was a...... European standards body that had already given Microsoft fits by standardizing parts of the Windows 3.1 API, which European governments insisted on. They said, "Microsoft, we can't use your operating system without some standards." And Microsoft said, you know, "Here's our docs." And, and the government said, "No, we need a European standard." So this body called the European Computer Manufacturers Association, ECMA, which eventually became global and became a proper noun instead of an acronym.
- LFLex Fridman
Right. It's, uh, it's just one capital E now-
- BEBrendan Eich
Yeah.
- LFLex Fridman
... with a lowercase CMA.
- BEBrendan Eich
Right. And as, uh, one of the early Microsoft guys I met when we first convened a, a working group to talk about JavaScript said, "It sounds like a skin disease." (laughs)
- LFLex Fridman
But it gave, uh... I mean, maybe you'll speak to that, but it gave the name to JavaScript of ECMAScript.
- BEBrendan Eich
That was the standard name because Java was a trademark of Sun's. They were so aggressive, they were sending cease and desist letters to-
- LFLex Fridman
Oh, yeah.
- BEBrendan Eich
... people whose, you know, Middle European heritage meant their pr- their surname was Javanko, and they called their website javanko.com. And Sun would... sent them a letter saying, "You're using J-A-V-A at the start of your domain name, you must cease and desist." (laughs)
- LFLex Fridman
I love marketing more than anything else in this world. Uh, d- so (laughs) so ECMAScript, and now is popularly named as ES-plus version.
- BEBrendan Eich
I would say people use JS more than anything. People still say JavaScript.
- LFLex Fridman
Oh, right, right.
- BEBrendan Eich
JavaScript is in all the books.
- 58:43 – 1:04:33
Javascript standardization
- BEBrendan Eich
- LFLex Fridman
Was this standardization process beautiful or painful, that th- those early days, you as the designer of the language?
- BEBrendan Eich
It was painful because it was rushed. Now, Guy Steele was contributed by Sun, so even more than Shawn, you had this giant brain, Guy Steele, helping, bringing some of that Scheme magic. And he even brought Richard Gabriel for fun. And Richard wrote the fourth clause of the ECMA standard, about... which is kind of a intro to what JavaScript's all about. So we had some, some really good people. And we didn't fight too much. There was some tension where I was fixing bugs and I was late to a meeting, and Shawn Katzenberger of Microsoft was actually mad. Like, "Where is he? We need him." And when I got there, I saw that only he saw this sort of off-by-one bug in, somewhere in the spec, and then I saw it too, and I said, "There's a fence post bug there." And then we kinda locked eyes and we realized we were on the same page, and we kinda... he wasn't mad anymore.
- LFLex Fridman
What, what were the features that are being, like, struggled over and debated and thought about and ƒeveloped?
- BEBrendan Eich
It was mainly writing down what worked and what we, we thought should work in the edge cases that didn't inter-operate or that seemed wrong. Uh, but we were already laying the groundwork for the future editions that I was already implementing, 'c-... I was still trying to lead the standard by using the dominant market power-
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
... to write the code that actually shipped.
- LFLex Fridman
Mm-hmm. Nice.
- BEBrendan Eich
So the de facto standard would lead the de jure standard, and I was putting in the, the missing, you know, function forms that I didn't have time for in the 10 days, uh, like-
- LFLex Fridman
So this is the engineering mindset versus the theoretician. So you didn't wanna create the perfect language, but one that was the popular and shipped-
- BEBrendan Eich
Yeah.
- LFLex Fridman
... and all that kinda stuff.
- BEBrendan Eich
And you could say there was... y- I was standing on the shoulders of giants, so there was a staged process where I had to hold back things that it, were well-designed by others in other languages and I could imitate, but I couldn't do them all in the 10 days. So they came in, in 1996 and '97, and they came into the n- third edition of the standard, which was final- finalized in 1999. But at that point, Netscape had been sold to AOL and was... which was a decent exit considering... And, uh, you know, had previously been, uh, mercilessly crushed. Th- Netscape was selling the browser along with server software th- that it had acquired after its IPO, and Microsoft was just underpricing it, so there was no way to compete with that. Microsoft was also, you know, it... making Internet Explorer the default browser in Windows-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... which is called tying in antitrust law. And they were doing even more brutal things. There's a famous, uh, investor, he did very well on Google so he's a billionaire, Ram Shriram, and he was sales guy at, or head of sales at, at Netscape. And he got off the phone looking ashen-faced after Compaq called, and said, "Uh, Microsoft just told us they're gonna pull our Windows license if we ship Netscape as the default browser."
- LFLex Fridman
Wow.
- BEBrendan Eich
This is-
- LFLex Fridman
So there was just some bullying going on.
- BEBrendan Eich
It was totally in- material in the antitrust case. But, but N- JavaScript escaped into the standard-setting where there was fairly good cooperation. Microsoft had a really good guy on it, and, you know, Guy Steele was there for a time and, and there was some good work. But-... after the antitrust case, and, you know, Netscape kind of dissolving into AOL and not really going anywhere quickly, Mozilla took years to really bring up, um, the standard froze. And by 2003, even though they'd been sort of noodling around with advanced versions, JavaScript 2.0, uh, I'd given the keys to the kingdom to another MIT grad, Waldemar Horovitz.
- LFLex Fridman
Hmm.
- BEBrendan Eich
Very big brain, he's still at Google, I think. He won the Putnam in '86, so he's-
- LFLex Fridman
Wow.
- BEBrendan Eich
... yeah, very mathematical.
- LFLex Fridman
Legit, yeah.
- BEBrendan Eich
Um, he- he- he designed this successor language, JavaScript 2.0, but it- it only showed up in mutated form in Microsoft's ASP.NET server side, and it-
- LFLex Fridman
What? (laughs)
- BEBrendan Eich
... didn't last there. And it showed up in Flash, and that's what became ActionScript 3.0-
- LFLex Fridman
Ah, ActionScript.
- BEBrendan Eich
... with J. Yeah.
- LFLex Fridman
Interesting. And then, and then Flash of course declined, and so how do we arrive at ES6, where it's- it's like there's so many... Well, everyone... Okay, there's this history of JavaScript that people would... It was just, like, cool when you're, like, having beers to talk crap about JavaScript.
- 1:04:33 – 1:07:04
TypeScript
- BEBrendan Eich
- LFLex Fridman
Yeah, I mean, ES6 is such a- a big j- I mean, like you said, there's a thread that connects all of it, but ES6 is when it's, like, became this language that is- almost feels ready to take over the world completely. (laughs)
- BEBrendan Eich
More programming in the large features, more-
- LFLex Fridman
Yeah.
- BEBrendan Eich
... features you need for larger teams. And it-
- LFLex Fridman
Yep. Software engineering.
- BEBrendan Eich
Microsoft did something smart too, they, uh, Anders and company, um, Luke Hoban, who's left Microsoft, also did TypeScript, and they realized, uh, something I think that Gilad Bracha has also popularized and- and, uh, he was involved in Dart at Google. If you don't worry about soundness in the type system, you don't try to enforce the type checks at runtime in particular, just use it as sort of a warning system, a tool time type system, you can still have a lot of value for developers, especially in large projects.
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
So TypeScript's been a roaring success for Microsoft.
- LFLex Fridman
W- what do you think about Type- uh, what do you think about TypeScript? Is it, uh, adding confusion or is it ultimately beneficial?
- BEBrendan Eich
I think it's beneficial. Now, it's technically a superset of JavaScript, so of course I love it, right? (laughs)
- LFLex Fridman
Right.
- BEBrendan Eich
The- the- the shortest, uh, JavaScript, uh, program is still a TypeScript program.
- LFLex Fridman
Yeah.
- BEBrendan Eich
Any JavaScript program is a TypeScript program, which is brilliant because then you can start incrementally adding type annotations, getting warnings-
- LFLex Fridman
Yes.
- BEBrendan Eich
... learning how to use them. Uh, Microsoft's had to kinda look around corners at the standards body and guess how their version of modules or decorators should work, and- and the standards body then may change things a bit. So I think they're obligated with TypeScript either to carry their own version or to bring it back with incompatible changes toward the standard over time, and I think they've played generally fair there. There's some sentiment that, why don't they standardize TypeScript? Well, they've been clear they don't want to. It- they have a proprietary investment, it's valuable, they have control of the ball. And in- in some ways you- you can say the same thing to any of the other big companies in the standards body. Why doesn't Google standardize its stuff? Um...
- LFLex Fridman
So you- you think it'll continue being like a kind of a dance partner to- to JavaScript, to the base JavaScript?
- BEBrendan Eich
There's a hope that at some point, bec- if they keep reconverging it and the standard doesn't break them and goes in a good direction, we will get at least the annotation syntax and some semantics around them. Because when you're talking about type annotations, they're generally on, you know, parameters and return values and- and variable declarations, they're cast operators. You want that syntax to be reserved and you want it to work the same in all engines. And this is where ideas like Gilad's pluggable type systems might- might be good, though then you could create the same problem you have with Lisp and Scheme, where there's a bunch of macro libraries and they don't agree and you- you know, you have conflicts between them. But- but pluggable type systems could- could be one way
- 1:07:04 – 1:10:14
JavaScript ecosystem
- BEBrendan Eich
to standardize this.
- LFLex Fridman
What do you think about the giant ecosystem of frameworks, uh, in JavaScript? They- it feels like, uh, because, I mean, this is a side effect of how many people use JavaScript-
- BEBrendan Eich
Yes.
- LFLex Fridman
... a lot of, um, entrepreneurial spirit, like-
- BEBrendan Eich
Yeah.
- LFLex Fridman
... create their own JavaScripts, uh, J- uh, frameworks.
- BEBrendan Eich
Yeah.
- LFLex Fridman
And they're all actually awesome, uh, in our own different ways. And, uh, that...This is an interesting question about almost, like, philosophically about biological system and-
- BEBrendan Eich
Yes. Yes.
- LFLex Fridman
... evolution and all that kind of stuff. Do you see that as good or should it, like, should some of them die out quicker?
- BEBrendan Eich
I, I think that maybe they should. Now, jQuery was a very clever, uh, thing. John Resig made this library that was sort of query and do, and blended sort of CSS selector syntax with JavaScript sort of object graph or-
- LFLex Fridman
Yes.
- BEBrendan Eich
... DOM querying, and made it very easy for people to do things almost like they were learning jQuery as its own language-
- LFLex Fridman
Yes.
- BEBrendan Eich
... domain-specific language. And, uh, that, I think, reflected in part the difficulty of using the document object model. These APIs that were originally designed in the '90s for Java as well as JavaScript, they were very object-oriented or even procedural. They were very kind of verbose. And it took, like, a constructor call and three different, you know, hokey-pokey dances to do something, whereas in jQuery it's just one line.
- LFLex Fridman
Yep.
- BEBrendan Eich
Right? So that fed back finally into the standards. It didn't, it didn't mean we standardized jQuery. It wasn't quite that concise. But you find now with the modern standards that we were working on, uh, in the HTML5 sort of, um, effort, that things became simpler. The Fetch API and the Query Selector API, document.querySelector. A lot of things can be done now in raw JavaScript that you would make more concise and terse in, in jQuery, but it's, it's not bad. It's, it's pretty good. Whereas in the old DOM of 15 years ago, it was just too verbose.
- LFLex Fridman
So, maybe the frameworks were born kind of, uh, because JavaScript lacked some of the features of jQuery. And so, like, uh, now that JavaScript is f- is swallowing what jQuery was, then the frameworks will... Only the ones that truly add value will stick around and the other ones will die out.
- BEBrendan Eich
And that highlights this also, this division between the core language JavaScript, which can show up in other places like Node.js on the server side, and the browser-specific APIs or the document object model APIs, which are even managed by the W3C, the standards body that was off in XML la-la land when we were doing real JavaScript standards in ECMA. And you, y- y- you have this division of labor, division of responsibility, and division of style, and sort of, uh, aesthetics, and also speed. So, the document object model really stagnated after, um, Microsoft kind of de-invested in the web. And Microsoft did something in their haste, in the spirit of Netscape, doing things quickly and getting on first, called DHTML, and some of their innovations that were like an alternative document object model didn't really get standardized until HTML5 when we pragmatists at Opera at the time, uh, Ian Hickson who went to Google, uh, Apple, and Mozilla said, "Let's, let's... XML's not gonna replace HTML. HTML4 is too old. Let's standardize HTML5 based on all this good stuff, including that DHTML variant,
- 1:10:14 – 1:13:46
HTML5
- BEBrendan Eich
dynamic HTML."
- LFLex Fridman
HTML5, it feels like to me, maybe you can correct me, like a beautiful piece of design work. Uh, it was, uh, it's not often with web stuff, I, you have this f- breath of just like, "Oh, whoever did this is..." It, they f- it just feels good. Uh, is there... What, what are your thoughts about HTML? Is there... Am I being too romantic? Uh...
- BEBrendan Eich
A little bit. A little bit. (laughs)
- LFLex Fridman
Are there flaws, fundamental flaws to it that I'm just not aware of? (laughs)
- BEBrendan Eich
I'm, uh, m- I, um, you know, my old friend, Hicksey, did a great job. He was another renegade physics student. Uh, he, and he was a, basically a QA guy at Opera, but he obviously is a phy- trained physics, you know, uh, student, and, uh, someone who could write, a Britisher. He, he developed test suites and he started thinking about them more axiomatically. Now, this is, this can be good because you can sort of systematize in a way that makes a better HTML, or you can get caught in the pragmatism of saying, "Well, we have to handle all these edge cases, so we're just gonna have sort of a, a test matrix."
- LFLex Fridman
Mm-hmm.
- BEBrendan Eich
And if the matrix is large, it will not be beautiful by many people's likes. Everyone likes to minimize along their preferred dimensions, the seven special forms in Scheme or whatever. But, um, but reality is y- HTML needs, uh, to be big. It's kind of shambolic. (laughs) It's a creative multi-paradigm. And Hicksey did a good job, I would say, with, uh, uh, a bunch of it. Um, other people came in in the spirit of Ian Hickson to, to do HTML5 work, and they've carried on that effort, and it's, uh... So it's a mix of pragmatism, d- de facto standards from the past being sort of combined or written down for the first time and then rethought in a way that has a simpler syntax like the Fetch API instead of XMLHTTPRequest. Um-
- LFLex Fridman
This video too as well, it, it, It's ultimately-
- BEBrendan Eich
Yeah.
- LFLex Fridman
... it feels like, maybe you can correct me, it feels like it was the nail in the coffin of Flash.
- BEBrendan Eich
Steve Jobs saying no Flash on the iPhone, in my opinion, was the actual-
- LFLex Fridman
The phone-
- BEBrendan Eich
... stake to the heart. But, but-
- LFLex Fridman
Yeah.
- BEBrendan Eich
(laughs) Well, I'm not, I'm not sure what trope you want to use. S- Flash was a zombie for, u- until just this year, right? Or last year. I think last year was the end of Flash in main browsers. Um, but Jobs really did the death blow. And, uh, yeah, you're right. We had to make HTML5 competitive. I still don't think we got that beautiful timeline animation that we want.
- LFLex Fridman
The timeline things.
- BEBrendan Eich
Yeah.
- LFLex Fridman
You like the time... I mean, me from a, a, you know, I used to animate all kinds of stuff inside Flash, plus there's the programming element.
- BEBrendan Eich
Yes.
- LFLex Fridman
It was a little bit... I don't know if you can comment on that, but to me, it was a little bit like go-to statement, like, i- in a sense that it was a little bit too chaotic.
- BEBrendan Eich
Mm-hmm.
- LFLex Fridman
Like, it didn't, uh, that OCD part of me as a programmer wasn't satisfied by Flash. It feels like there was bugs that were introduced through the animation process that I couldn't debug easily.
- BEBrendan Eich
Yes.
- LFLex Fridman
Like-
- BEBrendan Eich
I heard that, too. I, I didn't use it, so I'm doing the grass is greener thing here.
- LFLex Fridman
Yeah.
- BEBrendan Eich
The thing about li- I liked about the animation model was that it was this immutable function of time. So, you could-
- LFLex Fridman
Yes.
- BEBrendan Eich
... time warp and you could... If you dodged these bugs or worked carefully, y- you could really make it sing in ways that I think is still a little challenging with w- web, uh, animation standards. But, uh, or just using raw canvas and WebGL. Um, but there's so many tools now that maybe it doesn't matter. And, and yet we had to, you know, do video. We had to do, uh, WebGL and then evolve it. Um, we had to do Web Audio. Um, but once we did all these things that helped Flash, uh, die thanks-
Episode duration: 2:59:18
Install uListen for AI-powered chat & search across the full episode — Get Full Transcript
Transcript of episode krB0enBeSiE
Get more out of YouTube videos.
High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.
Add to Chrome