Menu
O mnie Kontakt

Wczoraj Microsoft zaskoczył programistów ogłoszeniem, że ukochany język programowania TypeScript przechodzi całkowitą przebudowę. TypeScript jest jednym z najważniejszych projektów współczesnego rozwoju stron internetowych, ale ma jedną poważną wadę. Język TypeScript sam w sobie jest napisany w TypeScript, co nie sprzyja budowaniu dużych projektów. Wideo opublikowane przez Fireship przypomina o tym, że TypeScript potrzebuje nowego silnika wykonawczego, aby w pełni wykorzystać swój potencjał. Napotykając te trudności, Microsoft postanowił przemyśleć kwestię i józefa, a że nie można zrezygnować z doskonałości, wybór padł na... Go, język stworzony przez Google, swojego arch-nemesis! Nieoczekiwany wybór, który wywołał mieszane uczucia wśród fanów C Sharp i Rust. W filmie Fireship omawia powody, dla których Microsoft zdecydował się na to rozwiązanie oraz jakie zmiany może przynieść nowa architektura. W pełni zrozumieć, co to oznacza dla programistów i jak wpłynie to na ich codzienną pracę.

Anders Heilsberg, twórca Turbo Pascal i C Sharp, objaśnia w wideo, że TypeScript, jako nadzbiór JavaScript, wymagał optymalizacji, której nie był w stanie w pełni zapewnić. Przebudowa w Go może poprawić performance kompilacji i zmniejszyć czas kompilacji z 70 do 7 sekund. To znacząca zmiana, zwłaszcza w przypadku dużych projektów. Deweloperzy mogą w końcu spodziewać się większej wydajności podczas pracy w VS Code. Chociaż projekt jest jeszcze w powijakach, już teraz widać, że zmiany te mogą przynieść korzyści w przyszłości, zwłaszcza dla osób intensywnie korzystających z TypeScript.

Fireship wskazuje również na kluczową różnicę w podejściu do kompilacji. Go, jako język kompilowany, generuje maszynowy kod optymalizowany. W przeciwieństwie do Java czy C Sharp, które przetwarzają swoje kody na bajty uruchamiane w maszynie wirtualnej, Go ma wyjątkową zdolność do automatycznego zarządzania pamięcią, co znacznie ułatwia programowanie. Te aspekty techniczne wskazują na celowe wybory Microsoftu. Jak podkreśla Fireship, nie powinno się tego nazywać całkowitą przebudową, lecz portowaniem do nowego języka, co oznacza zachowanie dotychczasowej semantyki kodu.

Programiści mogą skorzystać na tym, że pomimo nieco na początku chaotycznego etapu migracji do Go, stare błędy kompilatora pozostaną, ale zostaną naprawione w znacznie szybszy sposób. Nowa wersja kompilatora TypeScript 7 ma ujrzeć światło dzienne, ale wymaga to jeszcze czasu. Diagnozujmy, że to doskonałe posunięcie Microsoftu, aby wybrać najlepsze narzędzie dla tego zadania, zamiast polegać na wewnętrznych językach lub podążać za trendami. Na koniec, w wideo Fireship znalazły się statystyki, które są zapierające dech w piersiach – do chwili pisania tego artykułu, wideo miało ponad 1,1 miliona wyświetleń i 59 tysięcy polubień, co pokazuje, że temat wzbudził ogromne zainteresowanie. Warto obserwować dalszy rozwój tej historii i czekać na kolejne aktualizacje związane z TypeScript.

Toggle timeline summary

  • 00:00 Microsoft ogłosił całkowite przebudowanie TypeScript.
  • 00:08 TypeScript jest kluczowy dla nowoczesnego rozwoju aplikacji webowych, ale ma swoje ograniczenia.
  • 00:15 TypeScript jest napisany w TypeScript, co utrudnia optymalizację.
  • 00:38 Microsoft wybrał Go, opracowane przez Google, do przepisania kompilatora TypeScript.
  • 00:54 Dyskusja na temat wyboru Go przez Microsoft i jego implikacji.
  • 01:23 Wkład Andersa Heilsberga w języki programowania.
  • 01:30 TypeScript kompiluje do JavaScript, brak bezpośredniej obsługi czasz wykonawczych.
  • 01:50 Przejście na Go pozwala na znaczne poprawy wydajności.
  • 02:17 Go oferuje skompilowany kod i lepsze zarządzanie pamięcią.
  • 02:45 Proces jest bardziej kwestią przenoszenia niż całkowitego przepisywania.
  • 03:08 Nowy kompilator pojawi się z TypeScript 7, co zajmie trochę czasu.
  • 03:17 Pochwała dla decyzji Microsoftu o użyciu Go zamiast języków opracowanych wewnętrznie.
  • 03:30 Wzmianka o Sentry, sponsorze, który ułatwia debugowanie w projektach.
  • 04:02 Zakończenie wideo, podziękowanie dla widzów.

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.