Menu
About me Kontakt

Yesterday, Microsoft shocked programmers by announcing a complete rewrite of the beloved TypeScript programming language. TypeScript is one of the most significant projects in modern web development, but it has one major flaw. The TypeScript language is written in TypeScript itself, which is not quite optimized for building complex systems. Fireship’s video elaborates on the necessity for TypeScript to have a new execution engine to fully harness its potential. Faced with these issues, Microsoft decided to rethink their approach and rather than stick with a familiar language, they chose... Go, a language created by their arch-nemesis Google! This surprising selection has stirred mixed feelings among C# and Rust enthusiasts. In this video, Fireship discusses the reasons behind Microsoft's decision, what the new architecture could entail, and the future implications for developers who rely on TypeScript in their daily work.

Anders Heilsberg, the creator of Turbo Pascal and C#, explains in the video that TypeScript, as a superset of JavaScript, required optimizations that were difficult to achieve. By rewriting the compiler in Go, they can improve compilation performance, cutting the compile time from 70 seconds to just 7 seconds. This is especially pertinent for big projects. Developers can finally look forward to enhanced responsiveness while working in VS Code. While this project is still developing, it’s clear that these changes could lead to significant benefits for users who work extensively with TypeScript.

Fireship also highlights a crucial difference in compilation approach. Go, being a compiled language, generates optimized machine code. This contrasts with Java or C#, which compile their code into bytecode that runs on a virtual machine. Additionally, Go’s automatic memory management simplifies the programming experience compared to languages like C++ or Rust. These technical aspects point to Microsoft's deliberate choices. As Fireship emphasizes, this shouldn't strictly be called a total rewrite but rather a porting to a new language, which ensures that the previous code's behavior and semantics remain intact.

Programmers will benefit from this, as the old compiler errors will persist, but they will be resolved much faster. The new TypeScript 7 compiler is projected to be released, but that may take some time. It's commendable for Microsoft to choose the best tool for the job, setting aside any ego or preferences for in-house languages or trending languages like Rust. Finally, in Fireship's video, the statistics are impressive; at the time of writing this article, the video amassed over 1.1 million views and 59 thousand likes, showcasing the high level of interest in this topic. It will be exciting to watch how this story develops and await further updates regarding TypeScript.

Toggle timeline summary

  • 00:00 Microsoft announced a complete reprogramming of TypeScript.
  • 00:08 TypeScript is vital for modern web development but has limitations.
  • 00:15 TypeScript is written in TypeScript, which hampers optimization.
  • 00:38 Microsoft chose Go, developed by Google, for the TypeScript compiler rewrite.
  • 00:54 Discussion on Microsoft's choice of Go and its implications.
  • 01:23 Anders Heilsberg's contributions to programming languages.
  • 01:30 TypeScript compiles to JavaScript, lacking direct runtime support.
  • 01:50 Switching to Go allows for significant performance improvements.
  • 02:17 Go offers compiled code and better memory management.
  • 02:45 The process is more about porting than a total rewrite.
  • 03:08 The new compiler will come with TypeScript 7, taking time to release.
  • 03:17 Praise for Microsoft’s decision to use Go over in-house languages.
  • 03:30 Mention of Sentry, a sponsor, for simplifying debugging in projects.
  • 04:02 Closing remarks of the video, thanking viewers.

Transcription

Yesterday, Microsoft dropped an unexpected bombshell on programmers when it announced that the beloved TypeScript programming language is being completely reprogrammed. TypeScript is one of the most important projects in modern web development, but it has one fatal flaw. The TypeScript language itself is written in TypeScript, and TypeScript is just not optimized for building things like TypeScript. But you won't believe which language Anders Heilsberg and Microsoft chose for the rewrite. It's not the battle-tested C++. It's not Microsoft's golden boy C Sharp. It's not the highly memeable Rust. It's a language no one expected, which I will reveal in dramatic fashion at the end of this video to optimize viewer retention for the algorithm. Just kidding, I ain't finna play you like that. They used Go, a language developed by their arch-nemesis Google, a language with a simplistic type system and limited functional capabilities, a language that many people on the internet love to hate nowadays. All the C Sharp and Rust fanboys are feeling the effects of this panic function right now, and in today's video, we'll find out why this is a huge deal and answer the question of why did Microsoft go with Go. It is March 12, 2025, and you're watching The Code Report. Another day, another bat signal that must be answered. But this trend of waiting for the fireship video on every tech announcement has gotten out of control. Tech companies like Microsoft spend millions of dollars making these videos, and you guys are screwing everything up, causing the entire global economy to collapse. I'm Michael Jordan. Stop it. Get some help. That being said, Anders Heilsberg is one of the true 10x developer unicorns out there. He's the creator of Turbo Pascal, C Sharp, and TypeScript, and you really should watch his video. TypeScript is not your typical programming language. It's a superset of JavaScript and doesn't actually have its own runtime. TS code gets compiled or transpiled to JS code, which then runs somewhere like Node.js, Deno, Bun, or the browser. The problem is that because the TypeScript compiler is written in TypeScript, there's an inherent lack of support for low-level optimization, like direct memory access, native multithreading, and so on. The only way to truly fix the TypeScript compiler was to not write it in TypeScript. By switching to Go, the compiler is already 10 times faster, like they cut the VS code compile time from 70 seconds to 7 seconds, and they got similar 10x speedups on a bunch of other projects. That's cool and all, but the average developer should also see big performance gains in the editor. In big projects, TypeScript can be annoyingly slow in VS code, but the new compiler will change that in a big way. The big question, though, is why would Microsoft use Go? Well, unlike JavaScript, Go is a compiled language, and when you write Go code, it can be compiled into optimized machine code for all chips. This differs from Java or C Sharp, which is compiled into bytecode and then runs on a virtual machine. In addition, Go uses automatic memory management via garbage collection, which generally makes it easier to work with compared to something like C++ or Rust. But aside from performance, I think the main reason they chose Go is for portability. You see, calling this a total rewrite is actually not the right nomenclature. It's actually a port to a new language. What they're doing is going through every line of TypeScript code and converting it to the equivalent Go code, which means the behavior and semantics of the original code base is preserved. All of your favorite annoying compiler errors will still happen, just ten times faster than before, but we won't be able to reap these benefits right away. We're currently at TypeScript 5.8, but they're not going to release the new compiler until TypeScript 7, and it will likely take many months, if not years, to get there. Now, even though I'm still butthurt that Microsoft kicked me out of the MVP program, I think they deserve a lot of praise for the decision to go with Go. They could have used one of Microsoft's in-house languages, they could have jumped on the Rust or ZigHype trains, but instead they put their egos aside and used the best tool for the job. But if you're building a serious project with a lot of code like this, one thing's for sure, your code will break. And the best way to fix it faster is with Sentry, the sponsor of today's video. Their brand new Trace Explorer lets you search, filter, and visualize your span data across multiple traces in your code base. So instead of just debugging one request at a time, you're able to easily spot recurring issues and bottlenecks, then drill down to the exact span that's causing trouble and make a quick fix. You can even calculate key metrics, like 95th percentile latency, and turn them into alerts and beautiful dashboards for monitoring. It's the tool of choice for making your code not suck, and is trusted by 4 million developers, myself included. Give Sentry a try for free today with the link below. This has been The Code Report, thanks for watching, and I will see you in the next one.