HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

TypeScript is being ported to Go | interview with Anders Hejlsberg

Michigan TypeScript2 HN recommenders · recommended in 1 month, 2025-2025
YouTube
102K views · 1 year ago · interview · dated

An interview with Anders Hejlsberg, lead architect of TypeScript, about porting the TypeScript compiler to Go. He covers the 10x type-checking speedup, lower memory use, and why Go was chosen.

HN points to it as the authoritative answer to why the team picked Go rather than C# or Rust, citing timestamps on cyclic data structures and garbage collection.

Compilers, interpreters & program analysisC, C++, Rust, Go & systems languagesTech pioneers & interviews#typescript#go#compilers#andershejlsberg#performance

9 comments from Hacker News

@jtbaker2025 · in “Rv, a new kind of Ruby management tool”

▶ this video Around the 13 minute mark, Anders goes into it. IIRC, the big things were the GC and them both supporting cyclic data structures.

CitesView on HN
@osigurdson2025 · in “Why Go Rocks for Building a Lua Interpreter”

Yeah. They said that there were lots of nested structures with cycles and so on so it would be hard to do with Rust. Link below. ▶ this video

CitesView on HN
@homebrewer2025 · in “Type-constrained code generation with language models”

Hejlsberg mentioned the ability to quickly provide accurate type information to LLMs as one of the reasons for rewriting tsc into Go: ▶ this video

CitesView on HN
@emn132025 · in “Past, present, and future of Sorbet type syntax”

While I'm most familiar with C#, and haven't used Ruby professionally for almost a decade now, I think we'd be better off looking at typescript, for at least 3 reasons, probably more. 1. Flowsensitivity: It's a sure thing that in a dynamic language people use coding conventions that fit naturally to the runtime-checked nature of those types. That makes flow-sensitive typing really important. 2. Duck typing: dynamic languages and certainly ruby codebases I knew often use ducktyping. That works really well in something like typescript, including really simple features such as type-intersections and unions, but those features aren't present in C#. 3. Proof by survival: typescript is empirically a huge success. They're doing something right when it comes to retrospectively bolting on static types in a dynamic language. Almost certainly there are more things than I can think of off the top of my head. Even though I prefer C# to typescript or ruby _personally_ for most tasks, I don't think it's perfect, nor is it likely a good crib-sheet for historically dynamic languages looking to add a bit of static typing - at least, IMHO. Bit of a tangent, but there was a talk by anders hejlsberg as to why they're porting the TS compiler to Go (and implicitly not C#) - ▶ this video - I think it's worth recognizing the kind of stuff that goes into these choices that's inevitably not obvious at first glance. It's not about the "best" lanugage in a vacuum, it's a about the best tool for _your_ job and

CitesView on HN
@yohannesk2025 · in “A 10x Faster TypeScript”

If you are wondering why not Rust instead of Go, they outline why Rust was not chosen. This is a port not a reimplementation. Many of the data structures can not easily be ported to Rust, such as Nodes with cyclic dependencies. Check the longer interview here: ▶ this video Also, I think the discussion on esbuild's choice of language applies here as well as it has a large similarity. You can find it here on hn

RecommendsView on HN
@xanth2025 · in “A 10x Faster TypeScript”

I think the much larger ask C# couldn't answer is the "expressive" access to low level struct layout[1] [1] ▶ this video

CitesView on HN
@bokwoon2025 · in “A 10x Faster TypeScript”

▶ this video [19:14] why not C#? Dimitri: Was C# considered? Anders: It was, but I will say that I think Go definitely is -- it's, I'd say, the lowest-level language we can get to and still have automatic garbage collection. It's the most native-first language we can get to and still have automatic GC. In C#, it's sort of bytecode first, if you will; there is some ahead-of-time compilation available, but it's not on all platforms and it doesn't have a decade or more of hardening. It was not geared that way to begin with. Additionally, I think Go has a little more expressiveness when it comes to data structure layout, inline structs, and so forth. For us, one additional thing is that our JavaScript codebase is written in a highly functional style -- we use very few classes; in fact, the core compiler doesn't use classes at all -- and that is actually a characteristic of Go as well. Go is based on functions and data structures, whereas C# is heavily OOP-oriented, and we would have had to switch to an OOP paradigm to move to C#. That transition would have involved more friction than switching to Go. Ultimately, that was the path of least resistance for us. Dimitri: Great -- I mean, I have questions about that. I've struggled in the past a lot with Go in functional programming, but I'm glad to hear you say that those aren't struggles for you. That was one of my questions. Anders: When I say functional programming here, I mean sort of functional in the plain sense that we're dealing wi

CitesView on HN
@fixprix2025 · in “A 10x Faster TypeScript”

Anders answers that question here - ▶ this video Transcript: "But I will say that I think Go definitely is much more low-level. I'd say it's the lowest level language we can get to and still have automatic garbage collection. It's the most native-first language we can get to and still have automatic GC. In contrast, C# is sort of bytecode-first, if you will. There are some ahead-of-time compilation options available, but they're not on all platforms and don't really have a decade or more of hardening. They weren't engineered that way to begin with. I think Go also has a little more expressiveness when it comes to data structure layout, inline structs, and so forth."

CitesView on HN
@duckerude2025 · in “A 10x Faster TypeScript”

Anders Hejlsberg explains here: ▶ this video . TL;DW: - C# is bytecode-first, Go targets native code. While C# does have AOT capabilities nowadays this is not as mature as Go's and not all platforms support it. Go also has somewhat better control over data layout. They wanted to get as low-level as possible while still having garbage collection. - This is meant to be something of a 1:1 port rather than a rewrite, and the old code uses plain functions and data structures without an OOP style. This suits Go well while a C# port would have required more restructuring.

RecommendsView on HN
A 10x faster TypeScript13:45

A 10x faster TypeScript

Microsoft Developer
608K views • 1 year ago
GopherCon 2016: The Design of the Go Assembler - Rob Pike23:57

GopherCon 2016: The Design of the Go Assembler - Rob Pike

Gopher Academy
116K views • 10 years ago
Google I/O 2012 - Meet the Go Team1:00:29

Google I/O 2012 - Meet the Go Team

Google for Developers
108K views • 14 years ago
Anders Hejlsberg on Modern Compiler Construction34:10

Anders Hejlsberg on Modern Compiler Construction

Kasper
25K views • 9 years ago
Google I/O 2011: Writing Web Apps in Go51:12

Google I/O 2011: Writing Web Apps in Go

Google for Developers
135K views • 15 years ago
GopherCon 2014 Inside the Gophers Studio with Blake Mizerany48:19

GopherCon 2014 Inside the Gophers Studio with Blake Mizerany

Confreaks
8K views • 12 years ago
The Go Programming Language59:26

The Go Programming Language

Google TechTalks
406K views • 17 years ago
GopherCon 2014 Opening Keynote by Rob Pike56:36

GopherCon 2014 Opening Keynote by Rob Pike

Confreaks
38K views • 12 years ago
Sydney Golang Meetup - Rob Pike - Go 2 Draft Specifications1:07:00

Sydney Golang Meetup - Rob Pike - Go 2 Draft Specifications

Macquarie Group
57K views • 7 years ago
Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart43:14

Anders Hejlsberg and Lars Bak: TypeScript, JavaScript, and Dart

DartlangTV
14K views • 13 years ago
Hacking with Andrew and Brad: tip.golang.org1:02:49

Hacking with Andrew and Brad: tip.golang.org

The Go Programming Language
99K views • 11 years ago
Lang NEXT 2014 Panel  Systems Programming in 2014 and Beyond1:05:56

Lang NEXT 2014 Panel Systems Programming in 2014 and Beyond

25msr
3K views • 8 years ago
GoingNative 2012 - Day 2 - Clang1:00:54

GoingNative 2012 - Day 2 - Clang

aghuttun
13K views • 13 years ago
OSCON 2010:  Rob Pike, "Public Static Void"12:31

OSCON 2010: Rob Pike, "Public Static Void"

O'Reilly
119K views • 16 years ago
Lars Bergstrom - Beyond Safety and Speed: How Rust Fuels Team Productivity22:19

Lars Bergstrom - Beyond Safety and Speed: How Rust Fuels Team Productivity

Rust Nation UK
18K views • 2 years ago
Rust's Journey to Async/Await48:46

Rust's Journey to Async/Await

InfoQ
90K views • 7 years ago
Rob Pike about the target group of the Go programming language (golang)0:27

Rob Pike about the target group of the Go programming language (golang)

f8C4G86p KbqEFe47
7K views • 6 years ago
TypeScript types can run DOOM6:59

TypeScript types can run DOOM

Michigan TypeScript
485K views • 1 year ago
GopherCon 2015: Go GC: Solving the Latency Problem - Rick Hudson22:51

GopherCon 2015: Go GC: Solving the Latency Problem - Rick Hudson

Gopher Academy
22K views • 11 years ago
Interfacing D To Legacy C++ Code1:21:23

Interfacing D To Legacy C++ Code

NWCPP - Northwest C++ Users Group
5K views • 11 years ago