Creator of TypeScript: 10x Faster Typescript, Why AI Won't Replace SWEs
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
Anders Hejlsberg, creator of TypeScript and C#, discusses the technical decisions behind porting the TypeScript compiler from JavaScript to Go for a claimed 10x performance improvement. He explains why Go was chosen over Rust (garbage collection, shared-memory concurrency, and difficulty handling circular data structures with Rust's borrow checker), why they opted to port rather than rewrite from scratch to preserve backwards compatibility, and how LLMs played a smaller-than-expected role due to timing (the project started two years ago when LLMs were less capable). He also shares views on why JavaScript remains popular, why TypeScript became the most-used language on GitHub, and why he believes AI favors incumbent languages with large training data over new ones, making it unlikely AI will replace software engineers or make JavaScript obsolete.
Questions this post answers
Why did the TypeScript team choose Go instead of Rust for the native compiler rewrite?
Go was chosen because it has built-in garbage collection and excellent shared-memory concurrency support, both of which matched what the existing TypeScript compiler codebase assumed. Rust lacked garbage collection and its borrow checker does not allow the circular data structures (trees with parent pointers, recursive types) that fill the compiler's code, making a straight port infeasible without a full rewrite. Weighing Go against Rust for a systems rewrite? See how this tradeoff played out via daily.dev.
How much faster is the native TypeScript compiler compared to the old JavaScript version?
The rewritten native TypeScript compiler, ported from JavaScript to Go, achieves roughly a 10x performance improvement. This gain comes from eliminating the 2-3x overhead JavaScript pays versus native code and from unlocking shared-memory concurrency across CPU cores, which JavaScript's single-threaded design and web workers could not provide. Tracking compiler performance work like this helps teams planning their own migration on daily.dev.
How much did the TypeScript team use AI or LLMs when porting the compiler from JavaScript to Go?
LLMs were used far less than expected, mainly because the project began two years before the interview, when LLMs were much weaker. The scanner and parser were written manually, and a custom tool was built to syntactically translate TypeScript into Go (producing code with no syntax errors but that didn't compile), with AI used only occasionally for localized transformation help. Curious how large migrations balance manual tooling with AI help? Follow these engineering tradeoffs on daily.dev.
54.3K Impressions3 Comments