Skip to content

Creator of TypeScript: 10x Faster Typescript, Why AI Won't Replace SWEs | Anders Hejlsberg

The Peterman Pod

Hosted by Ryan Peterman

1h 5m
Transcript

Original podcast

Summary

Written by a model from the transcript; not yet reviewed.

Anders Hejlsberg, the creator of TypeScript and C#, discusses the recent native rewrite of the TypeScript compiler in Go, achieving a tenfold performance increase. He explains why JavaScript was originally chosen for the compiler, the architectural challenges of using a single-threaded language for compute-intensive workloads, and why a port was chosen over a complete rewrite to preserve backward compatibility. The conversation also covers the impact of AI on software engineering, the resilience of incumbent languages, and lessons learned from a decades-long career in programming language design.

  • Porting an existing codebase rather than rewriting it from scratch preserves semantic compatibility and algorithm consistency. 10:39
  • Choose Go for systems workloads requiring native code generation, garbage collection, and shared memory concurrency. 11:38
  • Leverage AI to write deterministic tooling that handles code translation rather than trusting stochastic LLM output directly. 17:10
  • Self-hosting a compiler within its target ecosystem provides immediate feedback on performance and usability issues. 2:11

Chapters

  1. 0:00
    Podcast Intro and Host Greeting

    The episode opens with the host introducing Anders Hejlsberg and previewing the discussion about TypeScript’s performance boost and AI’s impact.

  2. 0:33
    Unique Aspects of TypeScript’s Compiler

    Discussion of TypeScript’s transpiler nature, type‑checker role, and how it differs from traditional compilers that target machine code.

  3. 6:25
    AI’s Limitations in Writing Complex Systems

    Discussion of why AI struggles to generate sophisticated code like the TypeScript compiler and the stochastic nature of large language models.

  4. 7:38
    Native Rewrite Motivation and Language Choice

    Hejlsberg details the performance and scalability problems of JavaScript, the decision to port rather than rewrite, and why Go was chosen for the native rewrite.

  5. 14:49
    Porting Process and AI Involvement

    The team’s manual and automated approach to porting the compiler, the limited role of LLMs at the time, and future possibilities for AI‑assisted tooling.

  6. 24:58
    Future of JavaScript and TypeScript Adoption

    Hejlsberg predicts that incumbent languages like JavaScript and TypeScript will grow stronger with AI, and discusses the increasing dominance of TypeScript on GitHub.

  7. 26:32
    Impact of AI on Tooling and Performance

    Exploration of how AI agents rely on fast type‑checking, the importance of compiler speed for AI workflows, and the broader shift toward AI‑driven development.

  8. 33:04
    Building a Programming Language

    Advice on the technical and artistic aspects of language design, the importance of tooling, and lessons learned from long‑term language projects.

  9. 37:07
    Career Growth and Letting Go

    Hejlsberg reflects on transitioning from low‑level coding to high‑level design, the value of hands‑on work, and how he balances architecture with coding.

  10. 53:42
    AI’s Limitations and Human Responsibility

    Discussion on how AI may not fully replace humans and the importance of human oversight.

  11. 56:07
    Future of Junior and Senior Engineers

    Debate on whether AI will replace junior engineers and the implications for senior engineer training.

  12. 56:57
    Evolution of Programming Practices

    Hejlsberg reflects on how programming has shifted from manual coding to AI-assisted review and higher-level design.

Highlights

  • 2:04

    Why TypeScript Was Written in JavaScriptinsight

    The guest explains that self-hosting the compiler within the JavaScript ecosystem allowed the team to be daily users of their own tooling and enabled the compiler to run anywhere, including browsers.

  • 5:15

    Unique Nature of TypeScript's Type Checkerinsight

    TypeScript's type checker does not guide machine code generation because types are erased during compilation; instead, types exist purely for developer tooling and gradual typing.

  • 7:43

    Solving Performance and Concurrency Bottlenecksstrategy

    The guest outlines the motivation for the Go rewrite: JavaScript's single-threaded nature and lack of shared memory concurrency left multi-core CPU performance on the table.

  • 12:04

    Why Go Over Rust for the Rewriteinsight

    Go was chosen because it supports garbage collection, which easily accommodates the compiler's circular data structures and recursive types without manual borrow checking.

  • 19:08

    Asking AI to Write Programs, Not Answersstrategy

    The guest shares that instead of asking AI for direct complex answers which can be non-deterministic, it is more effective to ask AI to write a program that computes the answer.

  • 25:04

    TypeScript's Dominance on GitHubdata

    The guest notes that TypeScript recently surpassed JavaScript to become the number one used language on GitHub, capturing more than 50 percent usage.

  • 32:05

    Why Flow Lost to TypeScriptinsight

    Flow failed to win the typing competition because it was written in OCaml, making community contributions harder, and it lacked deep IDE-based tooling integration.

  • 34:44

    The Long Game of Language Designinsight

    Language design takes extreme devotion, noting that every language project takes at least 10 years and multiple versions before it truly stabilizes.

Quotes

  • “Don't let people tell you that it can't be done.”
    Unnamed speaker · 0:00
  • “If you think about Rust, what didn't it have that if it had it, you would have picked it?”
    Ryan Peterman · 0:20
  • “Because by writing it in TypeScript, we were also daily users of TypeScript and daily users of the tooling that we were building.”
    Unnamed speaker · 2:11
  • “I mean, if you're going to hand AI the keys, I mean, then all bets are off, right?”
    Unnamed speaker · 0:28
  • “I think also one thing in, in retrospect is like, don't let people tell you that it can't be done.”
    Unnamed speaker · 1:04:12
  • WorkOS 30:17–30:56
  • Jira by Atlassian 30:57–31:20

About this episode

Anders Hejlsberg is the creator of TypeScript and C#, and I asked him about how the TypeScript compiler got 10x faster through a rewrite in Go and his thoughts on how AI has impacted software engineering. • My ergonomic keyboard project I mentioned, you can follow along here: https://read.compose.llc/ • The Kickstarter page for it: https://www.kickstarter.com/projects/ryanlpeterman/compose-simple-ergonomics-beautifully-done Podcast links: • YouTube: https://www.youtube.com/watch?v=cywK3XYYJ2o • Apple: https://podcasts.apple.com/us/podcast/the-peterman-pod/id1777363835 • Transcript: https://www.developing.dev/p/creator-of-typescript-10x-faster Thank you to this episode's sponsors for supporting my work: • WorkOS: makes your app Enterprise Ready with easy to use APIs to add SSO, SCIM, RBAC, and more in just a few lines of code, check them out at https://workos.com/ • Jira by Atlassian: Get more work done with your favorite agents and models all in one place, check them out at https://jira.dev/ Timestamps: (00:00) Intro (00:48) Why write a compiler in JavaScript (07:29) Why rewrite the compiler in Go (14:49) LLMs for large migrations (20:12) Why Javascript is so popular (26:32) Why ever use Javascript on the backend (32:59) What it takes to build a programming language (37:06) Will there be fewer languages in 10 years (42:57) Hands on engineering vs delegation (49:14) Why fast tooling matters more now (51:16) AI software engineering predictions (58:52) The most technically challenging work (01:02:04) Top book recommendation (01:03:50) Advice for his younger self (01:05:00) Outro Where to find Anders: • GitHub: https://github.com/ahejlsberg • X/Twitter: https://x.com/ahejlsberg • Wikipedia: https://en.wikipedia.org/wiki/Anders_Hejlsberg • LinkedIn: https://www.linkedin.com/in/ahejlsberg/ Where to find Ryan: • Newsletter: https://www.developing.dev/ • X/Twitter: https://x.com/ryanlpeterman • LinkedIn: https://www.linkedin.com/in/ryanlpeterman/ • Threads: https://www.threads.com/@ryanlpeterman • Instagram: https://www.instagram.com/ryanlpeterman • TikTok: https://www.tiktok.com/@ryanlpeterman Referenced in this episode: • Flow type checker repository: https://github.com/facebook/flow • TypeScript compiler repository: https://github.com/microsoft/TypeScript • Algorithms + Data Structures = Programs (book): https://en.wikipedia.org/wiki/Algorithms_%2B_Data_Structures_%3D_Programs • TypeScript native rewrite: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/

Transcript

0:00
1:05:57

11,186 words · 2 speakers

Speaker names marked are inferred from speaking time and the show’s known hosts — they are not voice-verified.

Topics

  • JavaScript
  • TypeScript
  • AI
  • Go
  • Rust
  • Garbage collection
  • Flow
  • Shared memory concurrency
  • Turbo Pascal
  • TypeScript compiler

Page updated · transcript and summary are machine-generated