Hasty Briefsbeta

Bilingual

Why TypeScript picked Go over Rust for its new compiler

9 hours ago
  • TypeScript 7.0 replaced its old JavaScript-based compiler with a new one written in Go.
  • The port to Go preserved exact semantics and backward compatibility, avoiding a full rewrite.
  • Rust was not chosen because its memory safety and borrow-checking would require a complete rewrite of the compiler's logic.
  • Go met key requirements: performance improvement, robust native code generation across platforms, and support for shared-memory concurrency.
  • The new Go-based compiler delivers a 10x speedup, as announced by the TypeScript team.
  • The decision highlights engineering tradeoffs—Go was the practical choice for the job, not the flashiest one.