rob pike

@robpike@hachyderm.io

We have been public about not using Go as the bootstrap language. We started with a compiler in C for a number of reasons, mostly for ease of bootstrapping but also to avoid making a compiler-optimized language instead of a general purpose one. Once the language was designed, we ported the code to Go for ease of maintenance and development.

Well here is a variant of that pattern: the TypeScript compiler is also being ported to Go: youtube.com/watch?v=pNlq-EVld7

The video is worth watching for the reasons why. Turns out a general purpose language is indeed a good compiler language.

A 10x faster TypeScript - A 10x faster TypeScript

YouTube

A 10x faster TypeScript
March 12, 2025 at 10:33:12 PM

Also just a warning: If you use this post as a chance to criticize Go because of some opinion about its technical shortcomings, I've heard it all before and have no desire to hear more. I will simply block you.

I honestly think go is a great language for compiler development. Its GC performance profile works really well for the kinds of workloads you see in a compiler, plus the great concurrency story.

Like, nah, go isn't my favorite language to work in, but it's a really, really good fit for this.

Replying to someone

the compile and run anywhere without dependency handling is what makes it the first choice for tool chains like this I think. It’s the ergonomics of just having a binary.

Replying to someone

Some positivity seems warranted: I love working with go. Thank you.

To add to the answer for why Go: A post by one of the devs on github makes it clear that the biggest factor that favored Go was its ability to replicate the structure of the existing TS codebase with minimal translation.

github.com/microsoft/typescrip

Elk Logo

Welcome to Elk!

Elk is a nimble Mastodon web client. You can login to your Mastodon account and use it to interact with the fediverse.

Expect some bugs and missing features here and there. Elk is Open Source and we're actively improving it as a community project. Join us and let's build it together!

If you'd like to report a bug, help us testing, give feedback, or contribute, reach out to us on GitHub and get involved.

To boost development, you can sponsor the Team through GitHub Sponsors. We hope you enjoy Elk!

三咲智子 Kevin DengDaniel RoeTAKAHASHI ShuujiPatakAnthony FuJoaquín Sánchez

The Elk Team