Creator of TypeScript: 10x Faster Typescript, Why AI Won't Replace SWEs | Anders Hejlsberg

Anders Hejlsberg discusses the recent native rewrite of the TypeScript compiler in Go, which has made it ten times faster by leveraging multi-core CPUs and improving scalability, while emphasizing that AI, though helpful for routine coding tasks, will not replace human software engineers due to its stochastic nature and need for oversight. He also shares insights on language design, the importance of perseverance in engineering, and encourages continuous learning and hands-on involvement in coding.

Anders Hejlsberg, the creator of TypeScript and C#, discusses the recent native rewrite of the TypeScript compiler, which has made it ten times faster. Originally, the TypeScript compiler was written in JavaScript to stay within the JavaScript ecosystem, allowing developers to use and improve the tooling daily. JavaScript’s cross-platform nature enabled the compiler to run anywhere, including browsers. However, JavaScript’s single-threaded design and performance limitations for compute-intensive tasks like compilation motivated the move to a native language, specifically Go, which offers garbage collection, shared memory concurrency, and robust native code generation.

Hejlsberg explains that the TypeScript compiler is unique because it transpiles TypeScript to JavaScript rather than machine code, focusing heavily on type checking to improve developer tooling rather than runtime optimization. The gradual type system allows mixing typed and untyped code, which is uncommon in other languages. The native rewrite aimed to improve performance and scalability by leveraging multi-core CPUs, which JavaScript cannot efficiently utilize due to its concurrency restrictions. Go was chosen over languages like Rust because it better matched the compiler’s needs, such as garbage collection and handling circular data structures.

Regarding AI’s role in software development, Hejlsberg is cautiously optimistic. While AI can generate a significant amount of code, especially for routine tasks, it is unlikely to replace human engineers entirely, particularly for complex, novel problems like compiler development. He emphasizes that AI is a stochastic tool that requires human oversight and that handing over full control to AI without understanding the underlying code is risky. He also notes that AI currently excels more in widely used languages like JavaScript and TypeScript due to the abundance of training data, which may reinforce the dominance of incumbent languages.

Hejlsberg reflects on his career and the challenges of language design, highlighting the importance of balancing innovative features with the mundane but essential aspects of language implementation. He stresses the long-term commitment required to develop a successful programming language and the need to learn from existing languages. He also shares personal insights about the joy of coding and the importance of staying hands-on, even at senior levels, to maintain a connection with the codebase and the developer community.

Finally, Hejlsberg offers advice to aspiring engineers: don’t be discouraged by naysayers who say something can’t be done, as often that reflects their own limitations rather than reality. He recounts how early skepticism surrounded projects like Turbo Pascal, which he helped develop despite doubts. He also recommends foundational technical books like “Algorithms + Data Structures = Programs” by Niklaus Wirth to build a strong understanding of core concepts. Overall, Hejlsberg’s perspective combines technical depth with practical wisdom, emphasizing perseverance, continuous learning, and the evolving role of AI in software engineering.

Useful Links