Skip to content

Commit d186851

Browse files
committed
add ts post
1 parent c7a78d7 commit d186851

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
+++
2+
title = "TypeScript Goes Go: What Does This Mean for Us?"
3+
date = "2025-12-17"
4+
description = "Microsoft is rewriting the TypeScript compiler in Go. A 10x speedup sounds great, but what does it actually mean for day-to-day web development?"
5+
tags = ["typescript", "go", "performance", "tooling", "web-development"]
6+
draft = false
7+
+++
8+
9+
Anders Hejlsberg announced that Microsoft is porting TypeScript to Go. Yes, _that_ Go. Not Rust (which everyone expected), not C++ (which would be reasonable), but Go.
10+
11+
I'll admit my first reaction was a grin. Go is one of those languages I genuinely enjoy working with - simple, pragmatic, fast. My second reaction was "wait, 10x faster?" And my third was "okay, this makes a lot of sense actually."
12+
13+
## The Numbers
14+
15+
Let's start with what matters. According to the [official announcement](https://devblogs.microsoft.com/typescript/typescript-native-port/), we're looking at:
16+
17+
| Codebase | Current | Native | Speedup |
18+
| --------------------- | ------- | ------ | ------- |
19+
| VS Code (1.5M LOC) | 77.8s | 7.5s | 10.4x |
20+
| Playwright (356K LOC) | 11.1s | 1.1s | 10.1x |
21+
| TypeORM (270K LOC) | 17.5s | 1.3s | 13.5x |
22+
23+
Editor startup for VS Code's codebase drops from 9.6 seconds to 1.2 seconds. Memory usage is roughly halved. These aren't minor improvements - they're the difference between "go get coffee" and "already done."
24+
25+
For those of us who've sat through multi-minute TypeScript builds on larger codebases, this is genuinely exciting. I've worked on projects where `tsc --noEmit` was basically a meditation practice.
26+
27+
## Why Go?
28+
29+
This is where it gets interesting. The JavaScript/TypeScript ecosystem has seen a wave of performance-focused tooling rewritten in systems languages - esbuild (Go), SWC (Rust), oxc (Rust). So why did they choose Go?
30+
31+
I think it's actually a great choice:
32+
33+
1. **Go's garbage collector** plays nicely with the kind of memory allocation patterns a compiler needs - and frees the team from manual memory management headaches
34+
2. **Structural similarity** to the existing TypeScript codebase makes the port more straightforward (ironically, TypeScript to Go is a more direct translation than TypeScript to Rust would be)
35+
3. **Simplicity and readability** - Go's philosophy of "one obvious way to do things" makes for maintainable code, which matters when you're building something this critical
36+
4. **The team knows Go well** - an underrated reason to choose any technology, honestly
37+
38+
Nothing against Rust - it's a fantastic language. But Go's pragmatic approach feels very aligned with TypeScript's own philosophy. Both languages prioritize developer productivity and "just working" over theoretical purity.
39+
40+
The internet predictably had opinions about this choice. But I've learned to be suspicious of the "you should have used X" crowd. The TypeScript team has been maintaining one of the most successful language tools for over a decade. They probably know what they're doing. ¯\\_(ツ)_
41+
42+
## The Versioning Story
43+
44+
Here's how the transition works:
45+
46+
- **TypeScript 6.x** - The current JS-based compiler, continuing to receive updates
47+
- **TypeScript 7.0** - The new Go-based "native" compiler
48+
49+
The plan is to maintain TypeScript 6 until TypeScript 7 reaches maturity. So you're not being forced off a cliff. If your project depends on specific APIs or configurations that aren't ready in TypeScript 7, you can stick with 6 for a while.
50+
51+
They're also moving to LSP (Language Server Protocol), which has been on the wishlist forever. This should make TypeScript play nicer with editors beyond VS Code.
52+
53+
(Codenames, if you're curious: "Strada" for the original TypeScript and "Corsa" for the Go port. Both Italian car terms. Microsoft loves a theme.)
54+
55+
## What This Actually Means for You
56+
57+
Let's let the rubber hit the road: for most of us, this changes nothing about how we write code. TypeScript will still be TypeScript. Your `interface User { name: string }` isn't going anywhere. The type system works the same way.
58+
59+
What changes is the _experience_:
60+
61+
- **Faster CI builds** - Those 10x improvements translate directly to shorter pipelines
62+
- **Snappier editors** - Autocomplete and type checking that actually keeps up with your typing
63+
- **Larger projects become viable** - Monorepos that currently crawl might actually work
64+
65+
The TypeScript team specifically mentions that features "once considered out of reach" are now possible. Instant error listings across entire projects. More advanced refactorings. Deeper analysis that was previously too expensive to compute.
66+
67+
## The Elephant in the Room: AI Tooling
68+
69+
Here's a bit buried in the announcement that caught my attention:
70+
71+
> "This new foundation goes beyond today's developer experience and will enable the next generation of AI tools to enhance development."
72+
73+
AI coding assistants need fast, low-latency access to semantic information. When your Copilot or Claude or whatever needs to understand your codebase to suggest meaningful completions, a 10x faster type checker makes a real difference.
74+
75+
I'm not sure how I feel about optimizing for AI. But I also can't pretend that AI-assisted coding isn't becoming a significant part of how software gets written. (I've [written before](/posts/claude-code-game-changer-or-just-hype/) about trying to stay head instead of tail in that relationship.)
76+
77+
## My Take
78+
79+
I think this is good news:
80+
81+
1. **Faster tools make developers happier** - this is just true
82+
2. **Go is a solid choice** - pragmatic, fast, maintainable
83+
3. **The migration path is sane** - they're not breaking everything overnight
84+
4. **It shows investment in TypeScript's future** - Microsoft could have let it stagnate
85+
86+
Will it save TypeScript from its fundamental limitations? No. [TypeScript still won't save you](/posts/why-typescript-wont-save-you/) from bad architecture, missing validation, or the escape hatches that let lies into your type system. A faster compiler doesn't make `as unknown as User` any safer.
87+
88+
But a faster compiler does make the development experience better. And in a world where we're competing with "just use JavaScript" and "try this other language," a snappier TypeScript is a meaningful improvement.
89+
90+
## When Can You Try It?
91+
92+
Timeline from the original March announcement:
93+
94+
- **Mid-2025**: Preview of native `tsc` for command-line typechecking
95+
- **End of 2025**: Feature-complete project builds and language service
96+
97+
We're now past that mid-2025 milestone, so early previews should already be available. For widespread production use, 2026 seems realistic.
98+
99+
The code is already available on GitHub under the same license as TypeScript. You can build and run it today if you're curious (and don't mind incomplete features). Check the TypeScript blog post for the repo link and build instructions.
100+
101+
## Final Thoughts
102+
103+
Over a decade ago, TypeScript was a weird Microsoft experiment that most of us ignored. Now it's arguably the default choice for serious JavaScript development. The team clearly isn't resting on that success.
104+
105+
Will rewriting the compiler in Go be remembered as a brilliant move or a strange detour? I genuinely don't know. But I'm cautiously optimistic. Faster tools are almost always better tools, and the TypeScript team has earned some trust.
106+
107+
Now if you'll excuse me, I'm going to go write some Elm. ;)

0 commit comments

Comments
 (0)