Anders Hejlsberg on why they had to fix JavaScript

By GitHub

Share:

Key Concepts

  • JavaScript Runtime: The environment in which JavaScript code is executed (e.g., within a web browser).
  • Dynamic Programming Language: A programming paradigm where type checking is performed at runtime, offering flexibility but potentially impacting performance and tooling.
  • Script Sharp: A tool that compiles C# code into JavaScript.
  • Intermediate Representation (IR): A representation of code used internally by a compiler, often as a step between source code and machine code.
  • Tooling: The software development tools used for tasks like debugging, testing, and code analysis.

The Shift to JavaScript as a Platform

The speaker details a significant industry shift where JavaScript unexpectedly became the dominant platform for application development. Initially, improvements in JavaScript runtimes within web browsers led to acceptable performance for Java code executed via technologies like applets. This realization led to the understanding that the true platform wasn’t Java itself, but rather JavaScript, the browser, and HTML. Consequently, developers began building increasingly complex applications leveraging these technologies. However, this growth exposed the inherent difficulties of developing large-scale applications in a dynamically typed language like JavaScript, particularly due to the lack of robust tooling.

The Script Sharp Revelation & Tooling Challenges

The Microsoft Outlook.com team approached the speaker’s team regarding a project called “Script Sharp.” Script Sharp allowed developers to write code in C# and then compile it into JavaScript for execution in the browser. The speaker initially questioned the logic of this approach, viewing it as a compromise – utilizing the benefits of C#’s tooling while ultimately running in JavaScript. The core issue highlighted was the inadequacy of JavaScript’s tooling for large-scale development. The question posed was, “is JavaScript really that broken?” and whether resorting to compiling another language to JavaScript was the optimal solution. The speaker frames this as treating JavaScript as an intermediate representation (IR) or bytecode, rather than a primary development language.

The Search for a JavaScript Fix

This realization sparked an exploration into directly improving JavaScript itself. The speaker implies that the team began investigating ways to address the tooling and development challenges within JavaScript, rather than circumventing them by using a different source language. The final statement, “that it’s worked out pretty well,” suggests that this exploration yielded positive results, though the specifics of those results are not detailed in this excerpt.

Logical Connections

The narrative follows a clear progression: initial success with JavaScript runtimes -> increasing application complexity -> discovery of tooling limitations -> the Script Sharp solution as a symptom of the problem -> a decision to focus on improving JavaScript directly. The speaker’s questioning of Script Sharp serves as a pivotal moment, shifting the focus from a workaround to a fundamental problem with the JavaScript ecosystem.

Notable Quote

“Well it turns out the reason you want to do that is then you can get grownup tooling.” – This quote succinctly captures the primary motivation behind using Script Sharp: to leverage the superior development tools available for C# to mitigate the shortcomings of JavaScript’s tooling.

Chat with this Video

AI-Powered

Hi! I can answer questions about this video "Anders Hejlsberg on why they had to fix JavaScript". What would you like to know?

Chat is based on the transcript of this video and may not be 100% accurate.

Related Videos

Ready to summarize another video?

Summarize YouTube Video