If you had a superpower to make a single change to JavaScript – what would it be?
In a Nutshell
JavaScript's backward compatibility requirement severely restricts language evolution, making meaningful breaking changes impossible without fundamentally changing what JavaScript is. Most developers now write TypeScript rather than JavaScript, but integrating TypeScript directly into browsers faces significant performance barriers due to expensive parsing costs. The speaker sees no compelling value in native TypeScript support since build tools are already required anyway, and alternative type hinting systems would be too different from TypeScript to be worthwhile.
These notes were generated by AI and may contain inaccuracies.
JavaScript is fundamentally an evolution of the same thing that has existed since its inception. The speaker has written websites before CSS existed and remembers when JavaScript started to become a thing. This gives JavaScript a certain vintage that matches the speaker's experience in internet years.
JavaScript has maintained the same fundamental functionality for decades, which has enabled everything written in JavaScript over the last decades to continue working in browsers and wherever it runs. However, this creates a pretty huge burden. The principle of "don't break the web" is a fundamental driving principle of how the language evolves, and it is very restricting in what it allows to be done with the language.
If the speaker could make one change, it would be figuring out a way to do breaking changes into JavaScript in a way that feels comfortable. Getting rid of the restriction of maintaining backward compatibility would be really interesting. However, removing this restriction might be too much of a good thing solution, as JavaScript would no longer really be JavaScript and could become something else entirely.
Most people writing JavaScript these days are probably actually writing TypeScript. Even when the JavaScript being written could theoretically be running directly in a browser or environment, it often isn't, particularly when talking about content going on the web.
Sign in to read the full notes
Get access to AI-generated notes, topic timestamps, and more.