Will Javascript Take Over the World? | Brian Kernighan and Lex Fridman

Brian Kernighan says JavaScript went from ugly to viable through better design and compilation, but won't take over the world. He worries that heavy reliance on third-party libraries like npm creates security risks and dependency bloat that weaken programming discipline.
Chapters
So what do you think about another language of JavaScript? That's this. Well, let me just sort of comment on what I said when I was brought up. Sort of JavaScript was seen as the probably like the ugliest language possible. And yet it's quite arguably, quite possibly taking over not just the front end, the back end of the Internet, but, but possibly in the future taking over everything because they've now learned to make it very efficient.
Yeah.
So what do you think about this?
Yeah, well, I think you captured it in a lot of ways. When it first came out, JavaScript was deemed to be fairly irregular and an ugly language. And certainly in the academy, if you said you were working on JavaScript, people would ridicule you. It was just not fit for academics to work on. I think a lot of that has evolved. The language itself has evolved and certainly the technology of compiling it is fantastically better than it was. And so in that sense it's absolutely a viable solution on back ends as well as the front ends used. Well, I think it's a pretty good language. I've written a modest amount of it and I've played with JavaScript translators and things like that. I'm not a real expert and it's hard to keep up even there with the new things that come along with it. So I don't know whether it will ever take over the world. I think not. But it, it's certainly an important language and worth knowing more about.
There's. There's maybe to get your comment on something which JavaScript and actually most languages, sort of Python. Such a big part of the experience of programming with those languages includes libraries sort of using building on top of the code that other people have built. I think that's probably different from the experience that we just talked about from Unix and C days when you're building stuff from scratch. What do you think about this world of essentially leveraging, building up libraries on top of each other and leveraging them?
Yeah, that's a very perceptive kind of question. One of the reasons programming was fun in the old days was that you were really building it all yourself. The number of libraries you had to deal with was quite small. Maybe it was printf or the standard library or something like that. And that is not the case today. And if you want to do something in. You mentioned Python and JavaScript and those are the two fine examples, you have to typically download a boatload of other stuff and you have no idea what you're getting. Absolutely nothing. I've been doing some playing with machine learning over the last couple of days, and gee, something doesn't work well, you pip install this, okay? And down comes another gazillion megabytes of something, and you have no idea what it was. And if you're lucky, it works. And if it doesn't work, you have no recourse. There's absolutely no way you could figure out which of these thousand different packages. And I think it's worse in the NPM environment for JavaScript. I think there's less discipline, less control.
There, and there's aspects of not just not understanding how it works, but there's security issues, there's robustness issues. So you don't want to run a nuclear power plant using JavaScript, essentially?
Probably not.










