HomeVideos

TypeScript, C# and Turbo Pascal with Anders Hejlsberg

Now Playing

TypeScript, C# and Turbo Pascal with Anders Hejlsberg

Transcript

2170 segments

0:00

Why was it called Turbo Pascal?

0:01

>> Because it was fast. This was when Audi

0:03

had their Quattros and their turbos, and

0:05

this thing was fast and super

0:07

interactive.

0:07

>> When you started out building C#, what

0:09

were your design goals?

0:10

>> We knew we wanted to build an

0:11

object-oriented language. We wanted

0:13

managed code or bytecode so we could

0:15

target different runtime environments.

0:17

We wanted garbage collection and

0:19

exception handling, but also things like

0:21

a unified object system.

0:23

>> What do you think made TypeScript this

0:25

popular? Absolutely because of the

0:27

better tooling. We were totally right

0:29

there that added an erasable type system

0:31

and then using that to enable great

0:33

tooling is where the productivity boost

0:36

is realized.

0:36

>> What is your take on either modifying

0:39

existing languages for AI usage or

0:42

coming up with a language that is more

0:43

suited for AI agents to use? Well, my

0:46

flip and answer there is

0:52

Anders Hejlsberg is one of the biggest

0:54

living legends in the tech industry.

0:55

[music]

0:56

He created Turbo Pascal, Delphi, C#, and

0:58

TypeScript. The impact he has had on

1:00

programming languages and developer

1:01

tools is immense. Today with Anders we

1:03

discuss how C# might have not been born

1:06

if [music] it was not for the Sun versus

1:08

Microsoft lawsuit over Java. The

1:10

behind-the-scenes story of TypeScript

1:11

and why open-sourcing it was a [music]

1:12

huge deal inside of Microsoft. What he's

1:15

learned from 40 years of designing

1:16

languages, including why IDEs and

1:18

programming languages go hand-in-hand,

1:20

and many [music] more. If you want to be

1:21

behind-the-scenes look at how three of

1:23

the most used programming languages in

1:24

history got built and how AI might

1:26

change our usage of programming

1:27

languages, this episode [music] is for

1:29

you. Before we start, I'd like to

1:31

introduce our presenting for the season,

1:33

Antithesis. A definite trend that I'm

1:35

seeing across the industry is a lot more

1:37

focus on testing, unsurprisingly thanks

1:39

to AI. We know that software is hard to

1:41

test, and we also know that AI is making

1:43

it worse. Thanks for producing

1:45

increasingly more code and more complex

1:47

code. The bottleneck is becoming

1:49

reviewing the code, testing it, and

1:51

trusting it. Or is it? We tend to think

1:54

that code reviews are the bottleneck

1:55

because you cannot scale human reviewers

1:57

with token spend. But the problem

1:59

actually goes beyond code view. Really,

2:01

it's about verification. We know that AI

2:04

cannot verify itself. To verify the

2:06

correctness of AI generated software, we

2:08

would need to catch issues that

2:09

traditional tests miss, including issues

2:11

that we did not even think of in a code

2:13

base that is changing at superhuman

2:15

speed. Oh, and we need to do all of this

2:18

before deploying to production. The only

2:20

way to verify that software works is to

2:22

run it with realistic faults. And this

2:24

is exactly what Antithesis does. You can

2:26

bring the system you work on under test

2:29

and verify that it works as it should.

2:31

Teams at Etsy and Jane Street are doing

2:33

just this. And I'm also starting to use

2:35

Antithesis to test real-world systems.

2:37

Over the season, I'll be sharing a lot

2:39

more on how it works and how it can help

2:41

verify that a system is bug-free. In the

2:43

meantime, check out

2:44

antithesis.com/pragmatic

2:45

to learn more.

2:47

Anders, welcome to the podcast.

2:50

Thank you.

2:51

It's brilliant to meet you. You've

2:53

created widely used programming

2:56

languages including the one that I I

2:58

learned first to program with Turbo

3:00

Pascal.

3:01

How did you get into programming? Well,

3:04

I was lucky enough to attend a high

3:06

school that This is back in Copenhagen

3:09

uh that offered students access to a

3:11

computer. It was one of the first high

3:12

schools in Denmark to do so.

3:14

And we're talking, you know, mid to late

3:16

'70s now. And I sort of got bitten by it

3:19

then, you know, just this idea that you

3:22

could program this machine and make it

3:24

do things you know, the wonder of

3:26

figuring out how it was put together. Of

3:27

course, it was like completely ancient

3:29

by modern standards standards. It was

3:32

like this HP 2100 with 32K of ferrite

3:36

core memory. You could literally open it

3:38

up and see the ferrite cores. I mean, it

3:40

was it was amazing, you know, paper tape

3:43

reader and

3:44

you know, and then we got a

3:46

1 MB 14-in hard drive and that was just

3:49

state-of-the-art. The bootloader was on

3:52

paper tape cuz there was no ROM in the

3:54

machine. So, so it started up and knew

3:56

nothing and so you had to type in the

3:58

instruction sequence to load the

4:00

bootloader that would then load the OS

4:03

off of the the hard drive. And as as a

4:06

kid, what did you start to program on

4:07

it? What captured your imagination?

4:09

Well, this this was a Hewlett-Packard,

4:11

so it had Fortran, which I found to be

4:14

very quirky. It had a very slow basic

4:17

uh interpreter, but then it had Algol.

4:20

Hewlett-Packard's version of Algol,

4:21

which was an interesting compiler

4:23

implementation because it didn't support

4:25

recursion.

4:26

Uh

4:27

which is kind of bizarre. You know, the

4:29

call instruction of that machine would

4:30

store the return address in the first

4:32

word of the subroutine and then just

4:34

execute and then to return you would

4:36

jump to that indirect through that word.

4:39

So, if you called yourself, you'd just

4:41

be gone forever, you know? So, and of

4:43

course, there were no debuggers or

4:44

anything to help you figure this out, so

4:46

you just had to be real careful about

4:48

which algorithms you used, but but it

4:51

was it was compiled to machine code and

4:53

it ran, you know, and it was like you

4:55

could build games, which is what we

4:56

mostly did, like Lunar Landers and what

4:58

have you kind of thing, right? So, yeah,

5:01

it was fun. Back then, things were so

5:03

simple, right? You could see all the way

5:04

to the bottom. I mean, it it there was

5:06

just no no layering and nothing. It was

5:10

you you you were right on top of the

5:11

hardware. I guess you needed to you

5:13

needed to see all the way to the bottom

5:15

as well, pretty much, right? Back then.

5:16

Well, I mean, you you it was just so

5:18

simple that you you could, right? And

5:20

that was the beauty of the of those

5:22

earlier. That was true with the

5:24

8-bit micros and even, you know, the

5:26

early PCs and whatever, right?

5:29

And then we've just added more and more

5:30

layers over time. All right, we have a

5:32

lot of layers right now, that's for

5:33

sure.

5:34

>> Mhm. And how did you go from building

5:37

games to actually building your first

5:39

ever compiler? And what was that

5:41

compiler? I started in '79 at the Danish

5:44

Technical University. At that time also,

5:48

you know, this was right when eight-bit

5:50

micros were starting to become

5:52

available. Eight-bit microprocessors,

5:54

right? Yes, exactly. And you And there

5:56

was usually these kits that you bought

5:58

that you had to solder together

5:59

yourself, and then of course they didn't

6:01

work, and then you have to figure out

6:02

why they didn't work. So, you you you

6:04

learned a lot about the hardware, too.

6:05

And I bought

6:07

a British Z80-based kit computer called

6:10

a Nascom.

6:12

And started learning assembly

6:14

programming on on that one. And then I

6:17

also met with some college buddies, and

6:19

we ended up founding a company. We had

6:21

the first

6:23

computer store in Copenhagen where you

6:24

could walk in and buy a computer, one of

6:27

these kit computers. And later

6:29

we sold Apple IIs and Vic-20s and

6:31

Commodore 64s and blah blah blah, you

6:34

know, all all of those different ones,

6:36

right? TRS-80s. So, I did a lot of

6:38

programming on those and found that

6:41

programming was really the thing that I

6:43

enjoyed. And of course, they all came

6:45

with Microsoft's ROM BASIC.

6:47

Um

6:48

and which was slow, but it allowed you

6:50

to write programs. Um but I always like

6:53

missed having a real programming

6:54

language.

6:55

Uh something like Algol or that I had

6:57

been taught, right? And then my my

6:59

buddy, the guy that I founded the

7:01

company with He was like, "Well, there's

7:02

this new thing called Pascal. You want

7:04

to check it out. And it's it's even

7:05

supposed to be simpler than Algol,"

7:07

which was which was actually true of

7:09

every language we have created. They got

7:11

increasingly simpler

7:12

as time went on. And Pascal was not that

7:15

hard to implement. And so, I got

7:16

interested in trying to do that.

7:18

Um and then wrote a little compiler

7:22

that fit into a 12K ROM.

7:25

Um that would compile a subset of

7:27

Pascal. And you could then yank out the

7:30

Microsoft ROM BASIC and stick in our ROM

7:32

instead. And then when you booted your

7:34

machine, you were in this little

7:35

environment where you could type in

7:36

Pascal programs and run them. And And

7:38

that was sort of the early precursor of

7:40

of Turbo Pascal, if you will. Many years

7:43

later, you joined

7:44

uh Borland, and I think it was in 1989,

7:48

and there you created Turbo Pascal, the

7:50

programming language, but also the IDE,

7:52

right? Well, there there's a little more

7:54

to that story. Uh

7:56

in that company that we had back in

7:58

Denmark, I ended up writing eventually a

8:00

a full implementation of Pascal for

8:03

eight eight-bit CPM-80. And then we

8:06

ended up doing a joint venture with

8:08

Borland, which was also a Danish

8:10

company. It was originally founded in

8:12

Denmark, and we

8:13

we made a royalty contract where they

8:15

would sell

8:17

our compiler

8:18

uh on a royalty. And that's how I got

8:20

involved in Borland. And we shipped that

8:22

first product in '83,

8:25

the first version of Turbo Pascal.

8:27

Um and then that took off

8:30

more than more than any of us had

8:32

expected. And eventually that ended up

8:34

being the thing that I did full-time.

8:36

Why was it called Turbo Pascal? I

8:38

understand you added things on top of

8:41

Pascal that was there. Well, I mean, it

8:43

was it was called Turbo Pascal cuz it

8:44

was fast. Back then, turbo was like this

8:47

was like it was Audi had their Quattros

8:49

and their turbos and the whatever, you

8:51

know, and turbo just meant fast, right?

8:53

And this thing was fast.

8:55

Uh and super interactive, right? And so

8:58

so Turbo Pascal it was. When Turbo

9:00

Pascal became big, was it big just

9:03

because of the compiler or also there

9:05

was an IDE a dedicated IDE for for Turbo

9:08

Pascal, right? Yes. Yes.

9:10

That was always the idea, and that that

9:13

goes back even to the predecessor of

9:15

Turbo Pascal, this idea that it's not

9:17

just a compiler. It's an experience,

9:20

right? I mean, you don't just compile

9:22

your programs. You also edit them. You

9:24

also run them. You also debug them. You

9:26

also have a runtime library. It all has

9:28

to like fit together. Do you know what I

9:30

mean?

9:31

And so Turbo Pascal was always about

9:33

building that whole cycle and try to

9:35

make it as interactive as as as basic

9:38

was as an interpreted language, right?

9:40

But giving you the performance of a

9:42

compiled language and the better, you

9:45

know, semantics and syntax of of of of a

9:48

Pascal versus basic. And so, that was

9:50

sort of the the idea from from day one,

9:53

you know.

9:54

Focus on the the whole cycle. And so,

9:57

when you were building the compiler, you

9:58

were already thinking of ways that the

10:01

IDE, for example, could make sense of or

10:03

could have helpful features for, maybe,

10:06

that the editing or debugging, for

10:07

example.

10:07

>> Oh, absolutely.

10:09

>> [laughter]

10:09

>> You know, the

10:11

the first versions of Turbo Pascal

10:12

didn't have a debugger, you know. You

10:14

you would just use writeln statements

10:16

and then uh and then then you'd just see

10:18

what happened, right? But, often if you

10:21

had some error and and it blew up, you

10:24

know, with a runtime error, we would

10:26

print out the address of the runtime

10:28

error, which is where where was the

10:29

program counter at that that that that

10:31

point. And then we had a mode in the

10:32

compiler where we would say, "Compile,

10:35

but stop at this address."

10:37

And so, the compiler was real simple. It

10:38

would just produce object code. And then

10:40

once it hit that address, it would just

10:42

say, "Well, whatever I'm syntactically

10:44

looking at right now, that must have

10:45

been around where the error was." So,

10:48

that was like how you could go to the

10:50

line where the error had occurred. Do

10:52

you know what I mean? It's it's not like

10:53

we had like line maps or debuggers or

10:56

any of that stuff. We just had the

10:57

compiler and it was just easy to make it

10:59

stop at a certain address, you know, in

11:01

the in the object output and then show

11:04

you where it was in the source code.

11:06

>> think Turbo Pascal was so popular? I I

11:08

remember back again, this was my first

11:10

programming experience. It was at

11:11

schools. It was outside of schools for

11:14

production software. And you you said

11:15

yourself that it spread like wildfire.

11:17

It was just better than all the

11:19

competition. It was faster. It was

11:22

smaller. Um it was more interactive and

11:25

it was also cheaper.

11:27

So, it was like 10 times better at a

11:29

tenth of the price of the of the

11:32

competition, right? Compilers back then

11:34

used to cost $500 and they were just

11:36

compilers and then you have to have an

11:38

editor and blah blah blah and it was

11:39

like this whole long-winded cycle of

11:42

inserting

11:43

different disks with compiler paths one

11:46

and two and what have you and and here

11:47

was this thing that just like

11:49

made it all go away and you could get it

11:51

for $49.95.

11:53

And for $49.95, I mean, heck, that was

11:55

worth it just to get the the manuals

11:57

that came with it, right? I mean, so

12:00

So, there was very little piracy because

12:03

it was so cheap.

12:04

Although,

12:05

speaking of piracy, we always had the

12:07

joke about

12:09

the the Russian site license, how we

12:10

sold one copy to Russia.

12:12

>> [laughter]

12:14

>> And then that got copied everywhere. But

12:17

after Turbo Pascal, you built Delphi,

12:20

which was an even bigger setup in many

12:23

ways that this was this was now a

12:24

integrated environment for for Windows

12:26

development. How did you evolve ideas

12:29

from Turbo Pascal and Delphi? The big

12:31

thing that happened there between Turbo

12:32

Pascal and Delphi was the advent of the

12:34

graphical user interface, right? We

12:36

switched from

12:37

running DOS in in text mode to running

12:41

Windows in in

12:43

in a GUI and that meant a new kind of

12:45

application, right? Uh that you had to

12:48

create. And at the same time,

12:50

competitively, Microsoft had created

12:53

Visual Basic, which was a very

12:55

impressive product, but still had some

12:58

of the very same flaws that we knew how

13:00

to compete with, right?

13:02

In terms of interpreted versus compiled

13:05

and extensible versus not or not

13:07

extensible versus ours that had classes

13:10

and object orientation and blah blah

13:12

blah. First, we set out to build a

13:13

Visual Basic competitor.

13:15

But then we also realized that well,

13:17

that's not really enough of an angle.

13:20

And then there was this other phenomenon

13:21

that was happening at the time which was

13:23

called client-server applications.

13:25

Um and there were a whole bunch of 4GL

13:29

application development tools for

13:31

database connected client-server apps.

13:34

And so, we set out to

13:37

build a tool that was like as

13:40

interactive and rapid application

13:41

development as Visual Basic, but with a

13:43

compiler behind it, target it also at

13:47

client-server enterprise apps. That were

13:49

And that was what Delphi sort of was

13:51

about, right? It worked out really well.

13:54

I mean, that that was the That's That

13:55

product to this day is still being used

13:58

actively by a a whole number of

14:00

programmers. I was very surprised when I

14:02

worked at Skype um right after Microsoft

14:05

bought it. I know. Yeah. Yeah. The Skype

14:08

application, you probably know this, it

14:09

was built in Delphi. It was. And in 2012

14:13

or 2013, there was a plan to rewrite it

14:16

and move it onto something else.

14:18

That rewrite, midway a year in, stopped.

14:20

So, I'm guessing that until the end of

14:23

of that Skype application, which was

14:24

decommissioned maybe a year ago.

14:26

>> It's amazing, isn't it? I mean, the

14:27

Delphi was is was and is in in in in in

14:30

some ways a wonderful way of building

14:32

Windows desktop apps. I mean, they had a

14:34

great you know, the the VCL, the Visual

14:36

Class Library that allowed you to

14:38

inherit components and install them on

14:41

the palette and make drag and drop work

14:43

for your forms designers with components

14:45

that you had built and whatever. It was

14:47

It was pretty cool. Yeah, and and we

14:49

already heard the the Microsoft link

14:50

with with Visual Basic. So, you joined

14:52

Microsoft in 1996. You worked on the J++

14:56

and then later C#, but can you take us

14:58

back to that moment in time? What was

15:00

the kind of programming environment

15:01

like? Well, the environment particularly

15:04

around the time where I joined

15:05

Microsoft, um

15:07

the mid-90s, Java had happened. Uh Well,

15:10

the browser had happened first of all,

15:12

and JavaScript. Uh But JavaScript, no

15:13

one really paid attention to JavaScript,

15:15

cuz that was just this little whatever

15:17

thingy that that was in the browser, you

15:19

know, and it was slow and it was like,

15:20

"Eh, no one uses that." Uh but then

15:22

there was this Java thing that allowed

15:24

you to create applets. Oh my god.

15:26

Applets fantastic and right on the

15:28

browser.

15:29

>> and everywhere. Yep, yep, right on the

15:31

browser and everywhere supposedly and

15:33

then and this language that was like

15:35

simple yet had object orientation and

15:38

byte codes and like like was platform

15:40

independent and I mean it was like

15:42

everyone was running around with like

15:44

with their heads cut off thinking this

15:46

was the end of languages. You know,

15:48

Java's going to flatten the the universe

15:50

and then and we're all just going to be

15:51

writing Java and Java applets and that

15:53

that's the that's it.

15:55

>> [laughter]

15:56

>> Little do you know and and and I

15:57

actually came to Microsoft ostensibly to

16:01

to be the the architect of Microsoft's

16:04

Java development tools.

16:06

And and worked on Visual J++ 6.0 was the

16:10

the version that They had Visual J++ 1.1

16:13

at the time I joined, which was

16:15

basically take Visual C++ yank out the

16:18

C++ compiler, sticking a Java compiler

16:21

and call it good.

16:23

Uh, but it wasn't interactive. It wasn't

16:25

rapid application development and

16:26

whatever and I came sort of with a whole

16:28

host of knowledge of

16:30

how to build interactive development

16:31

tools. And that's what we set out to do

16:33

with with Visual J++ 6.0.

16:37

Uh, and we also of course knew that,

16:39

"Hey, you know, I mean people are going

16:41

to be running on Windows and they're

16:42

going to want to be able to build

16:44

Windows desktop apps." And so we built a

16:47

class library that allowed you to do

16:48

that. This was the precur- WFC I think

16:51

it was called, but it was the precursor

16:53

of of WinForms, uh, you know, in in in

16:56

some ways. How did the development of

16:58

J++ go and and eventually how did it

17:01

lead to the idea of like, "Okay, let's

17:03

do something else completely completely

17:04

different?" Well, you know, development

17:06

of of J++ went went great until the big

17:10

Sun Microsoft lawsuit got in the way.

17:13

Um,

17:14

and and there was you know, and that is

17:16

like I mean and now we're talking like

17:18

business and whatever. It had nothing to

17:20

do with with with with with technical,

17:22

but it effectively meant that Visual J++

17:25

was never going to be

17:27

a product that companies would make a

17:30

bet on because they full well knew that,

17:32

you know, you you're not going to you're

17:34

not going to write your app in a in a

17:35

language that has been enjoyed by a

17:37

judge in San Jose, you know, or or

17:39

whatever. And so, we kind of realized at

17:41

that point, too, that maybe it's not a

17:43

great strategy to to

17:46

place your your development platform bet

17:50

on on technology that's licensed from a

17:52

competitor. And and that in turn, along

17:56

with the sort of dev situation at the

17:58

time, I mean, Microsoft's main

18:00

development

18:01

products at the time were

18:03

in two camps. There was Visual Basic,

18:06

rapid application development loved by

18:09

everybody, you know, cuz it was so easy

18:11

to build apps, right? But,

18:13

performance-wise, had problems,

18:16

extensibility-wise, wasn't so great. To

18:18

write new components, you had to write

18:19

them in C++ and whatever and

18:22

and then we had C++ with MFC and power

18:25

and expressiveness, but really what

18:26

people wanted was

18:28

both.

18:30

They wanted something that rolled both

18:31

of those up, right?

18:33

And then they also wanted like modern

18:35

things like garbage collection that say

18:37

Java had, for example, right? And

18:39

exception handling and a more

18:42

object-oriented, component-oriented way

18:45

of building your apps and and and all of

18:47

that was part of the genesis that led to

18:50

to .NET and to the C# language. So,

18:53

which one was first, .NET or C#

18:57

inside of of Microsoft? Well, they were

18:59

simultaneous, I would say, because we

19:02

knew we wanted to build

19:04

a runtime that

19:05

was

19:07

language independent because we knew

19:10

that we wanted to run Visual Basic on

19:11

it, and we wanted a way of running C++

19:14

on it, and we wanted the ability for

19:17

other languages

19:18

to to host themselves on this runtime.

19:20

But, we also knew that we needed to

19:22

build a language that would appeal to

19:26

both Visual Basic and C++ users and give

19:30

you sort of that golden thing in in in

19:32

the middle, right? And to be frank,

19:34

something that could compete with Java,

19:35

right? And so

19:37

so that's why we

19:39

we started out building C#.

19:41

And then when you started out building

19:43

C#, what were your design goals? You

19:45

mentioned a few things with garbage

19:46

collection or exception handling, but

19:47

how did you come up with like, "Okay,

19:49

what what will this language be?" Well,

19:51

like I said, I mean the the overarching

19:53

thing was this: power and productivity

19:55

of C++ with the ease of use of Visual

19:58

Basic

19:59

in a sense, right? But, what it also

20:01

meant was we we knew we wanted to build

20:03

an object-oriented language, we wanted

20:05

managed code or bytecode so we could

20:07

target different runtime environments,

20:09

we wanted garbage collection, um and

20:12

exception handling, but also things like

20:15

a unified object system where

20:18

and that's true in in in C#, like

20:21

anything can be assigned to an object,

20:22

and if it's a value type, we box it but

20:24

but and and it's a self-describing

20:26

object. So, reflection, you can ask an

20:28

object, "What are you?" and you can get

20:30

all of the facts about it at runtime,

20:32

and you can dynamically manipulate it in

20:35

ways that are just

20:37

don't exist in a in a in a lot of other

20:39

environments. So, we we knew we wanted

20:41

to go there with that. We wanted a

20:43

language that made

20:45

this new model of properties, methods,

20:48

and events first class, because that was

20:50

how components were built, as opposed to

20:53

just sort of functions and procedures

20:56

and and and and even objects, right? And

20:58

then we we actually also wanted to to

21:01

create a language that was standardized.

21:02

We wanted to give this language to a

21:04

standardization committee, um and try to

21:08

you know, level the playing field there.

21:10

And all of those things were sort of

21:12

like what was rolled up in in C#. You

21:14

definitely did. C# was my first

21:16

professional language where I I I worked

21:19

for that I think for about 5 years and

21:20

I've I I've seen both the tooling, the

21:22

capabilities of language and I still

21:24

think to this day in many ways that old

21:27

version of C# was ahead of some

21:28

languages today and in some ways. So,

21:30

it's very interesting to see how rich

21:33

that language was when it came out and

21:34

of course the developer love that

21:36

followed. But, can can you take us back

21:38

of what did it take to build a language

21:40

like this? Just in the more again, the

21:42

software engineers people are listening

21:44

they're used to building SaaS apps,

21:46

back-end services, you know, like like

21:48

certain projects, but we are not

21:50

familiar with with what it takes to

21:51

build a language, especially something

21:53

with such large ambitions inside

21:54

Microsoft. You knew millions developers

21:56

ideal would be using it. How did you get

21:58

to this? Did you How did you come up

22:00

with the road map? How big or large or

22:03

small team needs to work on this? I

22:05

think early on we decided that we want

22:08

to have a

22:09

team of people design this language, not

22:12

just

22:13

one. I was sort of

22:15

the guy who ran the group of designers,

22:18

but we put together a a group of six

22:21

people or so, six seven people and we

22:24

got in a room three times a week for 2

22:26

hours

22:27

and just started the design, you know,

22:29

like literally

22:31

let's start from the top. What is a We

22:33

all knew what a I mean, these were all

22:34

people who had built or worked on

22:36

programming languages before, right? And

22:38

and had seen all of the things you're

22:40

supposed to do and all the things you're

22:41

not supposed to do. And quite honestly,

22:44

language design is 90% the same and 10%

22:48

new for for pretty much every language.

22:50

Every language you build still has to

22:52

have a compiler. Compiler is still built

22:54

in a pretty much the same way. And of

22:56

course, as time marched on, people

22:59

demand more and more. You have to have

23:00

IDEs, you have to frameworks, you have

23:02

to blah blah blah blah blah, you know,

23:03

and it's all there there's So, there's a

23:06

lot of experience you want to pull in.

23:08

And and there's a lot of work that

23:09

you're doing that isn't really per se

23:11

new.

23:12

Um but but but every time around you you

23:14

try to fix the problems that you've been

23:16

exposed to. This language design group

23:18

worked together for years on end.

23:21

And it was lovely to come in to work

23:24

with a new idea and then immediately

23:26

have five or six people that you could

23:27

sit down and have a deep discussion with

23:29

without first having an hour level

23:32

setting. Do Do you know what I mean?

23:34

>> Yeah. Yeah. Um and and and and that

23:36

worked really really well because

23:38

because we could just jump right in, you

23:41

know, and and have two hours of

23:43

technical discussion. And everyone was

23:45

cognizant of okay,

23:47

if someone comes up with a new idea, now

23:49

it's our job to try to shoot it down.

23:51

What What's wrong with this idea? Do Do

23:53

you know what I mean? And if it could go

23:55

if it could stand the the test of of

23:57

that, then it was probably a decent

23:59

idea. And so so that was kind of how we

24:02

we we ran the design. And then I I wrote

24:06

the specification of the language in

24:08

parallel with our design meetings. And

24:10

then we had a group that was in parallel

24:12

implementing the compiler.

24:14

In actually implementing it in C++ or

24:17

rather

24:18

C plus minus because we didn't use all

24:20

of the C++ features, you know, in in

24:22

that compiler implementation. But it

24:24

wasn't we it wasn't until the Roslyn

24:26

project that we that we self-hosted the

24:29

C sharp compiler. And Roslyn meaning

24:32

that the compiler is in C sharp, right?

24:34

Exactly. Yes. Yes, that was the

24:37

a project that came later to

24:39

to build the compiler in itself. And

24:41

also early on, you know, this is you got

24:44

to remember back then IDEs were not

24:47

really all that fancy, you know. I mean,

24:49

we have syntax colorization. Statement

24:52

completion was kind of like well, some

24:54

IDEs were starting to dabble in it, but

24:56

it wasn't really norm. So, we built like

24:59

in a sense a classic compiler, but then

25:02

we also built this like mini language

25:04

service e thing that that sort of cut

25:06

some corners and whatever, but could do

25:08

some rudimentary statement completion

25:10

and syntax coloring. But in a sense, we

25:12

had two implementations that we had to

25:15

evolve in parallel. And over time, that

25:17

became quite a drag, right? Because as

25:20

we added generics and added other

25:22

features and link and whatever, and it

25:24

was like, "Oh my god, now now

25:26

this is like we got to go implement all

25:28

of these features twice

25:30

in the in the real compiler and in the

25:32

language service, right? And so, that

25:35

ultimately led us to

25:37

this project called Roslyn, where

25:39

we built a single compiler that really

25:41

is both

25:43

it's a compiler that can both function

25:45

as a command line compiler and as an

25:47

interactive service inside the IDE.

25:49

TypeScript is built that same way, also.

25:51

And there's a lot of learnings from from

25:53

doing it that way.

25:55

That are still not being taught in

25:56

school.

25:57

There are many useful things not being

25:59

taught in school, even when they are

26:00

useful to learn about. One of these

26:02

really useful tools that I must mention

26:03

is our seasonal sponsor, Turbo Puffer.

26:05

Turbo Puffer is a ridiculously scalable,

26:07

fast, and cheap vector and full-text

26:09

search engine built by an engineering

26:10

team that I really like. The first time

26:12

I heard about them was when I was

26:13

talking with one of Cursor's co-founders

26:15

about how their vector database could

26:16

not keep up with the number of code

26:18

bases that they were adding. This was

26:20

back in 2023. Cursor did something

26:22

seemingly risky. They took a bet on what

26:24

was a little known and relatively new

26:26

product at the time, Turbo Puffer. But

26:28

it paid off. Cursor moved their semantic

26:30

search workload over, and Turbo Puffer

26:32

was indeed able to handle Cursor's

26:34

massive, ever-increasing load.

26:36

The reason has everything to do with

26:37

smart engineering. Turbo Puffer is built

26:40

on top of object storage with smart

26:41

caching on NVMe SSDs. Cursor's active

26:44

code bases get loaded into the cache, so

26:46

searches are fast, and inactive code

26:48

bases fade into object storage. Cursor

26:50

has so many good things to say about

26:52

Turbo Puffer. They cut their semantic

26:54

search costs by 95% when they switched.

26:56

They think of Turbo Puffer engineers as

26:58

an immediate extension of their team in

26:59

Slack. And Turbo Puffer is one of the

27:01

few pieces of infrastructure that they

27:03

have not had to worry about as they

27:05

scaled. Today, Turbo Puffer indexes over

27:07

4 trillion documents for vector and

27:09

full-text search and is used by the

27:11

likes of Anthropic, Notion, Linear,

27:13

Ramp, and many others. I'm getting to

27:15

know the Turbo Puffer team and will

27:16

share more about some of the cool things

27:17

that they do behind the scenes

27:19

throughout the season. If you need

27:20

vector search or full-text search at

27:22

scale, think Turbo Puffer. Check it out

27:24

at turbopuffer.com/pragmatic.

27:27

When it comes to useful tools, I need to

27:29

also mention our season sponsor WorkOS.

27:31

One theme of today's episode with Anders

27:34

is how he has spent the time frame

27:35

thinking about developer productivity on

27:37

a scale that most of us do not. Decades,

27:40

not months or quarters. WorkOS takes the

27:42

same kind of a long-term view on

27:43

enterprise infrastructure. SSO, SCIM,

27:46

RBAC, audit logs, they've spent years

27:49

getting these right so you do not have

27:51

to spend weeks implementing them. That's

27:53

why the fastest-growing AI companies

27:54

trust WorkOS. Visit workos.com to learn

27:57

more. And with this, let's get back to

27:59

building languages with Anders.

28:01

And when you're building a a language as

28:03

as the your product was I guess the the

28:05

language itself, how did you get

28:07

feedback? Of course, you had the the you

28:09

already said the group criticized it.

28:11

Did you have an internal beta testers

28:13

cuz again for like a back-end service,

28:15

you would typically have a dogfooding,

28:18

alpha testing, beta testing, and then

28:20

you go public at some point, but this

28:21

this is not your your average software

28:23

as a service for sure. Yeah, I I mean,

28:25

luckily, we had internal clients. The

28:28

.NET Framework

28:30

very quickly

28:32

started implementing in C#. They had

28:34

sort of used a hacked-up version of C++

28:36

to to implement which was kind of odd

28:38

because I mean, it was like targeting

28:40

byte codes, but not really. And and so,

28:43

they switched to to to C#. And that

28:46

helped a lot.

28:47

Um and then we had other internal teams

28:49

using it and so we we got a bunch of

28:51

feedback that way and then we had, you

28:53

know, the cycle was not that long,

28:55

right? I mean, I think we started in

28:57

late '98 and by the PDC of 2000, uh we

29:01

had we signed up I mean, we basically

29:03

gave away beta copies, right? And and

29:05

got tons of of of of uh of users onto

29:08

it. Now C# introduced a lot of new

29:11

features that were net new, I think, to

29:14

to programming languages. LINQ is

29:15

certainly one of them, but one thing

29:17

that might have been maybe one of the

29:19

most influential uh parts that other

29:21

languages adopted as inspiration was the

29:23

async await uh setup. Looking back, what

29:27

do you think you got right with this

29:29

design and and why did it become so

29:30

copyable across languages like

29:32

JavaScript, Python, Rust, and others?

29:34

Well, a lot of languages are

29:37

are built around

29:40

cooperative multitasking in the sense

29:42

that they have an event loop that sits

29:45

and dispatches events and then, you

29:48

know, you handle the event and then you

29:49

yield back to

29:51

the event handler loop and it all runs

29:53

in a single thread cooperatively, right?

29:56

The problem with that is if you then

29:58

want to do some long-running work, how

30:00

do I stop in the middle of this piece of

30:03

long-running work and yield back to the

30:06

event loop cooperatively, right? And

30:09

then

30:09

and then when my result is ready, then I

30:11

can come back and continue executing

30:13

here. Well, in order to do that in

30:16

in an inverted architecture like that,

30:18

you have to build a state machine. And

30:19

state machines are notoriously hard for

30:21

for people to implement cuz you got to

30:23

move all of your state off of the stack

30:25

into objects. You got to remember where

30:27

and then you have this big case

30:29

statement that envelopes your entire

30:31

logic and it's it's like it's a

30:33

nightmare to to figure out, right? But

30:36

the transformation from

30:39

serially executing code into a state

30:41

machine this this this this continuation

30:44

processing style

30:46

translation is actually one that you can

30:48

do in a machine-based fashion.

30:51

You can have the compiler write the

30:52

state machine. If you introduce syntax

30:55

that allows you to indicate where you

30:56

want to yield. And that's what await is.

30:59

Await is basically I'm saying I want to

31:02

yield here. And then when and and I want

31:05

to yield this promise and then when the

31:07

promise completes I want you to come

31:09

back here and continue executing.

31:12

And then the compiler writes a state

31:13

machine around it. And it actually turns

31:15

it into this big switch statement.

31:19

You know, and moves all of the state

31:21

that survives across the await into

31:24

something that's heap allocated so it

31:25

can be brought back. And doing all of

31:27

that work is um

31:29

is something that compilers are great

31:31

at. And so that was sort of the idea

31:33

that

31:34

we have this new style of programming

31:36

where where we're using promises or the

31:39

equivalent of promises and and the

31:42

ability to yield and then we have

31:43

callbacks and but trying to write your

31:45

program in that style that's that's

31:47

also, you know, what what JavaScript

31:48

suffer from a lot, right? It's like all

31:50

this

31:51

callback style stuff. And with async

31:53

await you get sort of the illusion that

31:56

you're just writing normal sequential

31:58

code. And then the compiler does the the

32:00

the painful transformation for you. And

32:02

that turns out to be really useful. Um

32:05

now, arguably an alternative way of

32:07

doing this is to use

32:10

threads in the OS. But the problem with

32:12

threads is that they come with

32:14

pre-emptiveness and the OS has the

32:16

ability to pre-empt you at any point in

32:18

time and that's not necessarily what you

32:19

want and and and your UI now you have to

32:22

be multi-threaded in your UI and all

32:24

sorts of other problems come along with

32:26

it. Plus threads are heavyweight and

32:28

typically not well suited for

32:31

lightweight tasks like like you could do

32:33

with async functions. So there pros and

32:35

cons. Um you know, like async await

32:38

introduces this notion of function

32:39

coloring, which is unfortunate, where

32:41

you have two kinds of functions, async

32:43

functions and regular functions. And all

32:45

the red functions can call the blue

32:46

functions, but the blue functions can't

32:48

call the red functions. And then so that

32:49

means once you want, you know, a red

32:51

function, that now all everything above

32:53

it has to be red. And then so if you

32:56

want from a sync function to call

32:58

something async, well, then you got to

32:59

turn this function into an async

33:01

function and its caller has to be etc.

33:03

etc., right?

33:05

So that's unfortunate, and that's why

33:06

some environments

33:08

like Go, for example, has

33:11

has Go routines and green threads, which

33:13

are really

33:14

language emulated lightweight threads

33:17

that kind of do what I'm talking about,

33:20

but but at a much lower cost.

33:23

But you avoid the function coloring. So

33:25

there is a bunch of different things,

33:28

but but you know, but for an environment

33:30

that already exists like JavaScript or

33:32

like C# and and the Windows event loop

33:35

and and whatever, this this was the

33:37

right solution. Speaking of JavaScript,

33:40

as as C# was becoming really popular

33:43

across startups, enterprises, and so on,

33:46

it was exploding in popular games as

33:48

well. To this day, it's very popular

33:49

with games development. But JavaScript

33:52

was starting to become more popular. Can

33:55

you can you take us back to your

33:58

observations on on how how JavaScript

34:00

went from, you know, like the the

34:02

mid-90s to this script language no one

34:04

really took seriously to just exploding

34:07

in popularity? I think it was sort of a

34:09

confluence of a number of things that

34:12

happened in the early 2000s, right?

34:14

First of all, the

34:15

the JavaScript platform execution

34:18

platform matured a lot. Like Google did

34:21

their excellent work on V8, and all of a

34:23

sudden make JavaScript a fairly

34:25

performant programming language. HTML5

34:28

got ratified, and and and we were

34:31

getting to a point now where you could

34:32

actually build real UIs

34:35

in in JavaScript. And there was this

34:38

device revolution that the iPhone set

34:41

off.

34:42

And and and all of a sudden we have all

34:45

of these different form factors. It's

34:46

not just Windows PCs on the desktop

34:49

anymore. It's all sorts of diverse

34:51

devices, but

34:53

lo and behold, they all run browsers

34:55

with JavaScript in it. Lo and behold,

34:57

the real cross-platform language isn't

34:59

Java. It's JavaScript.

35:01

>> [laughter]

35:02

>> Who would have thought?

35:03

Exactly. And so the world started

35:05

opening its eyes to that and and started

35:08

building larger and larger applications

35:11

in JavaScript. And we saw that

35:13

externally, but also internally.

35:15

And one of the trigger events was when

35:17

the um

35:19

the outlook.com team

35:21

came to see the C# team and asked us

35:24

whether we

35:25

would pretty please productize this

35:28

thing called ScriptSharp. And we go,

35:30

"Well, what is what is ScriptSharp?"

35:32

It's this cross-compiler that allows you

35:35

to cross-compile C# into JavaScript such

35:38

that you can

35:40

basically treat JavaScript as an

35:42

instruction language and and run your C#

35:45

apps in a browser. And I'm like, "Well,

35:47

why would anyone want to do that?" Well,

35:49

because then you can get a grown-up

35:51

programming language with grown-up

35:53

tooling. You can use Visual Studio. You

35:55

can You can have projects. You can do

35:58

all of these wonderful things, you know,

36:00

that you can't do with JavaScript

36:01

because JavaScript is just a scripting

36:03

language with with shitty tooling. And

36:06

we were like, "Wow,

36:08

really? Well, gosh, well,

36:10

perhaps a better approach would be to

36:13

fix JavaScript."

36:15

>> [laughter]

36:15

>> I mean, surely you're not going to be

36:16

best of breed in the JavaScript

36:19

ecosystem by telling people to write in

36:20

a different programming language.

36:22

Although, plenty of people were like,

36:24

remember CoffeeScript and all of these

36:25

other like languages that targeted

36:27

JavaScript, right?

36:29

>> Yes, so there were a programming

36:30

language, right, which generated

36:32

JavaScript, but it wasn't JavaScript

36:34

itself. Yes. Yes, they were super

36:36

popular. I mean, like so many different

36:38

things did that. But JavaScript is

36:40

actually a pretty decent little

36:41

language. There are just some things

36:43

missing. You got to give credit there to

36:44

Brendan Eich. I mean, he he understood

36:47

functional programming. And Brendan

36:48

Eich, the the creator of JavaScript, and

36:50

he got functions as first-class objects

36:53

right in JavaScript, which is godsend

36:56

and and beautiful. But it doesn't have a

36:58

type system. And Yeah. we knew from

37:00

experience that you cannot build good

37:03

tooling without a type system. You can

37:05

build

37:06

decent tooling, but it's never going to

37:08

scale. It's never going to scale to

37:10

large teams cuz you can't describe your

37:12

intents

37:13

in in the code. There's no way of

37:14

formalizing any of this stuff, and

37:16

there's no way of analyzing it, and

37:17

there's no way of using it in an IDE to

37:21

give you statement completion and

37:22

refactoring and go to definition and

37:25

find all references and blah blah blah

37:26

blah. All of that stuff, right? That

37:28

germinated the idea of, "Hey, it's

37:31

we can we could create a superset of

37:33

JavaScript

37:34

that adds a type system, and then we

37:36

could just compile it away."

37:38

But then we have Now we have the

37:40

the foundation for great tooling, and

37:43

then we could build a great tooling on

37:44

top and actually

37:46

create a wonderful development

37:48

experience, right? That was sort of like

37:50

what we set out to do. When you set out

37:52

to do this, you not only set out to do

37:54

this, but you set out for some reason to

37:56

do it as open source, which took

37:59

everyone outside of Microsoft as a

38:00

surprise because old Microsoft under

38:02

Steve Ballmer was notoriously perceived

38:05

as anti-open source back then with the

38:08

Windows and and C# back in the day, of

38:10

course, I'm talking about. You know,

38:11

Microsoft were slowly waking up to the

38:14

fact that open source

38:16

was not going to go away.

38:18

And open source was where developers

38:20

wanted to be, and they were voting with

38:21

their feet. Yet,

38:24

there's a collective DNA,

38:26

you know, that has been trained to pull

38:28

you in the other direction, right? And

38:30

and and so, that battle was we were

38:34

right in the center of that. And we we

38:36

full well knew that

38:38

there was absolutely zero chance that we

38:40

would appeal to the JavaScript ecosystem

38:44

with a proprietary programming language

38:47

licensed from Microsoft. No. No one was

38:50

going to come. It had to be open source.

38:52

There was just no two ways about it,

38:54

right? But getting that off the ground

38:55

inside Microsoft, it took some

38:58

some pulling.

39:00

Um and we paid some taxes. We We did

39:03

eventually get the okay to do open

39:05

source uh because we had two technical

39:07

fellows, myself and Steve Lucco, uh who

39:10

was the the other co-inventor of of of

39:12

of TypeScript, insisting that that was

39:14

what we had to do. And so, okay. There

39:17

people weren't going to debate that. But

39:19

but of course you have to pay the tax

39:20

and be on Microsoft's open source

39:22

repository called CodePlex, where

39:24

exactly no one was. Um and and so, we

39:27

were there for the first 2 years. Um and

39:30

it kind of was crickets, you know. And

39:32

it wasn't until 2014 when we moved on to

39:34

GitHub that things really started to get

39:36

moving

39:38

um with with adoption. And also,

39:40

honestly, it it it totally changed our

39:42

workflow. You know, there's open source

39:44

and there's open development. And and

39:46

and we were technically open source in

39:48

the beginning, but it was not open

39:49

development. We would sort of lob the

39:51

source code out in this repository and

39:53

scrape the issues off of that and put it

39:55

into our internal issue tracker. And

39:57

then, you you know,

39:58

but once we switched to GitHub, the

40:00

entire

40:01

workflow

40:03

moved to open development, also. And

40:05

that I love that workflow. And that's

40:08

we've been there now for over a decade.

40:10

Uh and it's been fantastic. Uh and it's

40:13

what made the product as good as it is.

40:15

Just over a decade later, so

40:18

the language moves to GitHub in 2014 and

40:21

in November 2025

40:23

the the GitHub Octoverse report revealed

40:26

that TypeScript became the most popular

40:28

language across GitHub. Outside of the

40:30

type system, what do you think made

40:32

TypeScript this popular? And of course,

40:35

we've had other languages, Python

40:37

being the other very popular one, but

40:39

what captures developers' preferences

40:41

this well? Well, I think, you know, it

40:44

didn't just happen overnight, you know?

40:46

And if you look back at at at, you know,

40:48

all of a sudden we we surfaced as number

40:50

10, and then we climbed slowly over the

40:54

years up and and and sat next to

40:57

JavaScript, right? And of course, if you

40:58

added JavaScript and TypeScript

41:00

together, then we were already number

41:02

one. It's just which syntax were were

41:04

you using type annotations or not? And

41:06

more and more people

41:08

over time just decided to adopt that. I

41:11

mean, some

41:12

early on were using JSDoc or or or

41:15

whatever, you know, and it like these

41:17

types in comments or or that we also

41:20

supported. But gradually, I think people

41:22

just realized, "Hey, this is this is the

41:24

right way to do it." And the reason they

41:26

came, I think, is absolutely because of

41:30

the the better tooling. And I think we

41:32

were totally right there that like

41:33

adding a an erasable type system and

41:35

then

41:36

using that to enable great tooling

41:39

is really where the pro where the

41:41

programmer productivity boost is

41:44

realized. And I guess this is where we

41:45

cannot like not mention VS Code, which

41:49

shipped that great tooling

41:51

also as a free to use for for most

41:54

people, at least initially for for for

41:55

most people, which which also made a big

41:57

difference. Absolutely. Yeah, that's our

41:59

our sister project, which is written in

42:01

TypeScript. And so, they were one of our

42:03

earliest adopters, uh and that we work

42:05

pretty closely with them um to this day.

42:08

That whole interplay, that in turn This

42:10

what led to the invention of uh

42:13

of LSP, the language server protocol

42:15

that now pretty much every tool vendor

42:18

uses to enable

42:20

interactive services in the IDE. Oddly,

42:23

it isn't until this port to go now that

42:26

we're switching to LSP. We had our own

42:28

precursor of LSP because the LSP didn't

42:31

exist when we first integrated

42:33

TypeScript into into Visual Studio Code.

42:35

But there are a lot of learnings from

42:36

from that. So it's it's been

42:38

an incredibly symbiotic and and

42:40

fulfilling experience to build these two

42:44

projects in parallel in open source.

42:46

And I think it has totally changed

42:48

people's view of Microsoft in in the

42:50

developer ecosystem. Plus

42:52

developers who again are not as familiar

42:55

with compilers themselves. We of course

42:57

like I I use TypeScript and I I'm aware

42:59

that there's some compilation going.

43:01

Could you give us a brief overview of

43:02

what the types of compiler pipeline

43:04

looks like in terms of parts and and

43:06

what parts you specifically focus on

43:08

more?

43:09

Sure. It's in many ways a fairly typical

43:12

compiler and in many ways not. Pretty

43:14

much every compiler has you know, what's

43:16

known as a lexer or a scanner that takes

43:19

text and turns it into tokens.

43:21

And then typically on top of that you

43:22

have a parser that takes the tokens,

43:25

checks their sequencing, and then makes

43:27

abstract syntax trees, which is a

43:30

you know, a tree that you can navigate

43:32

that effectively is a map of of the

43:34

source code, you know, but broken into

43:36

syntactic primitives and checked that

43:38

you know, like syntactically everything

43:40

is is or grammatically that everything

43:42

is correct. So those are the first two

43:44

stages of the pipeline.

43:45

Um

43:46

Then we have

43:48

well, we have a one extra pass that we

43:50

called a binder, which is you know, once

43:53

we have the parse trees

43:55

then we bind symbol information to them

43:57

where we find all of the all of the

44:00

declarations

44:01

of variables and whatever and build

44:03

symbol tables and attach them to their

44:05

functions such that we can then later

44:06

look up names effectively. And we also

44:09

build in the binder, we build a control

44:11

flow graph, and I can talk about what

44:13

what that helps us do. And then we have

44:14

the type checker,

44:16

which is the largest part of our

44:18

pipeline. And that's the the thing that

44:21

checks semantically that your program is

44:24

correct. It's the thing that figures out

44:25

types and checks that the types relate

44:28

correctly and that you're assigning the

44:29

right thing to the right thing and then

44:31

that, you know, that you're calling

44:33

something that actually exists them then

44:35

and so forth. And then we have an an

44:38

optional stage at the end called our

44:40

emitter.

44:41

And normally

44:42

the emitter

44:43

infrastructure in a compiler is also

44:46

quite big because that's where you go

44:47

from intermediate representation to

44:50

machine code

44:51

or byte code. Now, in our case, we just

44:55

erase types, if you will. Well, we kind

44:57

of do two things in in our compiler,

44:59

actually. Early on, it was very much

45:01

about

45:02

A, erasing the types, but B, also

45:05

down-leveling your your code. So, we

45:08

would take newer ECMAScript features

45:10

that weren't yet supported by the

45:12

runtimes, for example, classes, and then

45:14

we would down-level them to constructor

45:15

functions and whatever, and so we would

45:17

rewrite the code. And that was a very

45:19

popular feature early on. Now, pretty

45:22

much every browser is evergreen, and you

45:24

know, like ECMAScript features are are

45:26

are are caught up, and and so so that's

45:29

not as important anymore. So, our

45:30

emitter is effectively, you know, a

45:33

thing that just erases type annotations

45:35

and spits out the JavaScript code that

45:37

can run unannotated and also can spit

45:40

out declaration files, which are

45:41

summaries of

45:43

your modules and and so forth. But the

45:44

those are sort of the stages.

45:47

Now, the thing that's interesting about

45:48

the compiler, though, is that it's built

45:50

in a manner that where it can function

45:53

in a highly interactive mode, which is

45:56

what the IDE uses. Normally, you know,

45:57

command-line compilers, they just run

45:59

through these stages, and, you know, the

46:02

output is just whatever gets emitted or

46:05

some error messages, right? But in an

46:07

IDE, you know, the compiler is a

46:09

service.

46:10

And what we do in that service

46:13

is

46:15

we basically take a program that is

46:17

perpetually broken because you're

46:18

typing. And yet we try to syntactically

46:21

or semantically analyze it and because

46:24

we need to know when you press dot here,

46:26

what could you what could come next?

46:27

Well, that means we need to know what is

46:29

the type of the thing you dotted on. In

46:30

order for to figure that out, we may

46:32

have to resolve stuff. We may have to

46:34

look at ASTs over here and whatever.

46:36

And all of that has to happen within 200

46:39

milliseconds or else people think the

46:41

IDE is slow.

46:42

Right? Well, what if you have

46:44

500,000 lines of code?

46:47

You can't compile all of those in 200

46:50

milliseconds. So, you got to be super

46:52

super deferred and interactive. And so

46:55

you got to do minimal amounts of work.

46:57

And that's how our compiler is built is

47:00

it tries to front load. Like for

47:02

example, like you have 500,000 lines of

47:04

code. Well, let's say in 500 files.

47:07

Well, we could build the ASTs for 499 of

47:10

the files and just sit on them. We don't

47:12

have to rebuild those because you're not

47:14

editing those files.

47:16

We just have to update the AST of the

47:18

current file you're in.

47:19

So, that goes 500 times faster, right?

47:22

Then then if we had to do all of it. And

47:24

then we don't actually have to figure

47:26

out all of the types in here either. We

47:28

can just start

47:29

where you're at and then just resolve

47:32

just enough to answer the question that

47:34

you're that you're needing an answer for

47:36

right now. And so everything is lazy and

47:38

deferred and functional and reusable

47:43

inside the compiler. And it's a very

47:45

different way of writing compilers than

47:47

than what the textbooks will

47:49

traditionally teach you. Yeah, cuz I I

47:51

guess this is now these are interactive

47:52

compilers, if you will, right? It sounds

47:54

like it's it's it's more than a compiler

47:56

or a lot more difficult problem to

47:57

solve. The same engine is there, but but

48:00

you got to build it in a

48:02

in a manner where it can be very

48:05

interactive. And that was not typically

48:09

important for compilers, you know. And

48:12

so TypeScript is a superset of

48:14

JavaScript. What are some features you

48:18

would try to add if only JavaScript

48:20

would allow it, or if you were able to

48:22

influence JavaScript's road map? What

48:24

what what what What is something that

48:25

you feel could make TypeScript a lot

48:27

better, but of course there's a

48:28

constraint there? We track the

48:30

ECMAScript committee, and and and and,

48:32

you know, new language features that get

48:34

developed in ECMAScript, we we implement

48:36

once they reach uh stage three or four

48:39

in the standardization committee. And

48:41

then then we've sort of been on that

48:42

train ever ever since the beginning. So,

48:44

there is a pipeline that supplies new

48:47

language features

48:48

in a standardized manner. We sort of see

48:51

it as our purview to define the type

48:53

system on top.

48:55

Right? So, that is, if you will, our our

48:58

playground. Now, I still have things

49:01

that I wish I could have in the language

49:03

itself. I mean, I like functional

49:05

programming. I like functional

49:06

programming languages, and and key to

49:08

them is that that everything is an

49:10

expression. There's really no

49:12

distinction between statements and

49:14

expressions. And so, one of the the

49:17

features that JavaScript lacks, in my in

49:20

in my estimate, is is the ability to

49:22

give symbolic names to temporary results

49:24

and expressions, and then reuse them.

49:26

This is the let let blah equals whatever

49:29

in some expression, that functional

49:32

programming languages, you know, like

49:34

camel and whatever, all have.

49:36

And it's nice because you could just

49:38

stay in an expression context, and you

49:40

can just dot things together, and and

49:42

blah blah blah whatever, and sort of do

49:43

this more fluent style of programming.

49:44

But then all of a sudden you need a name

49:46

for something you want to reuse, and now

49:47

you've got to pop out and declare a

49:49

variable, or turn it into state Anyway.

49:51

You know, that's one thing that I would

49:53

like to fix. There's There's something

49:54

called do expressions that may or may

49:57

not happen at some point, but it's

49:58

taking a long time. So, anyway, but I

50:01

mean, generally speaking, I think

50:03

JavaScript is a is a nice little

50:04

language. It just has some issues, you

50:06

know, and then and I think we're very

50:08

good at teasing them out with our type

50:10

checker, right? And so So, once you have

50:13

a checker that can warn you, "Hey,

50:16

you're about to do something stupid

50:17

here."

50:18

Then,

50:19

it's not so bad. The thing that makes it

50:21

interesting, I think, and and unlike

50:23

pretty much any other programming

50:25

language is the gradual typing.

50:27

This This notion that

50:29

you can have types, but you don't have

50:30

to have types. Other languages force you

50:33

to type everything, right? Um, because

50:36

they in turn use that information to

50:38

generate

50:39

machine code, uh, you know, based on

50:42

what the type is, you know, different

50:43

instructions for float versus int versus

50:45

whatever, where

50:47

in JavaScript, the types or in

50:48

TypeScript, the types are They're purely

50:50

for

50:51

the development experience and the

50:53

checking. When the program runs, they're

50:55

all gone.

50:56

Now, of course, there are still types,

50:57

but they're all dynamically computed.

51:00

But that's kind of interesting because

51:02

that means in the language, we don't

51:04

necessarily have to prove 100%

51:08

correctness. And a lot of language

51:10

features that we have, we can't 100%

51:13

prove correctness.

51:14

Like in a structural type system with

51:16

recursive types, there are just cases

51:18

that you can't analyze because the types

51:21

are infinitely recurring. The more you

51:23

try to relate two types, the deeper you

51:25

go, and you're just staring into the the

51:27

recursive abyss. Do you know what I

51:29

mean?

51:30

But you can kind of go, "Well, well,

51:32

we've proven it to four levels.

51:35

That's probably good enough. We're just

51:37

going to say it's good enough." And

51:38

then, you know, if everything else works

51:40

out, we're going to go, "Sure." That you

51:41

can't do if if you were to go generate

51:44

machine code that then would have

51:45

indeterminate behavior, right? But if

51:47

JavaScript has a runtime where

51:49

everything is well defined already.

51:52

So, if we're checking 99% instead of

51:55

100%, well, heck, that's better than the

51:58

0% that JavaScript checked, right? And

52:00

it gives you like language features that

52:02

no other languages can provide because

52:04

they can't get to 100%.

52:06

>> [laughter]

52:06

>> It's interesting how constraints lead to

52:09

innovation or even limitations can lead

52:11

to more innovation. Speaking of

52:12

innovation, one one of the biggest

52:14

innovations that is everywhere is the AI

52:16

agents, AI coding tools that us software

52:19

engineers, most software engineers are

52:21

using, increasingly using AI agents as

52:23

well. As you're developing languages on

52:26

on on a more, I guess, niche team, what

52:29

kinds of uh AI tools are you using or or

52:32

how is AI helping your language

52:34

development work? May that be TypeScript

52:36

or C#. Day-to-day I work on on

52:38

TypeScript and I can certainly talk

52:40

about how we've been

52:42

in the process of moving TypeScript to

52:44

native code for the last year and a half

52:46

or so. In the beginning of that project,

52:48

AI was nowhere near as capable as it is

52:51

now, and therefore we could not really

52:53

use much of it in the beginning. At this

52:55

point though, I'd say we're using we're

52:57

using AI fairly well. Obviously,

53:00

we're on GitHub, we use AI to code

53:02

review pull requests. That in the

53:04

beginning was not all that great, but

53:06

now it's actually getting a lot better.

53:08

Um

53:09

we use uh AI to implement issues or or

53:14

fix issues,

53:15

simple issues. And then it succeeds some

53:18

of the time.

53:20

Um in this port that we're doing, you

53:23

know, because we snapped a copy of the

53:24

source code from a year and a half ago

53:26

and then ported it.

53:28

We have a backlog of PRs that need to be

53:30

moved on to the new native compiler, and

53:33

so we're using AI to help us move those

53:36

pull requests.

53:38

Um and that's actually going fairly well

53:40

at at this point. And then

53:42

we use it for a bunch of drudgery

53:44

drudgery work like okay, here's this

53:46

feature. Please write me some tests in

53:48

the same style as these other tests,

53:50

right? And kaboom, it's like no one

53:52

likes writing tests. AI loves writing

53:54

tests and it'll just pump out more tests

53:56

and great, you know, so so we're trying

53:59

to use it to

54:01

get rid of all the toil that otherwise

54:04

we would spend our time on, right? But I

54:06

would say we're not at point where it

54:08

absolves us from understanding what

54:10

we're doing.

54:11

>> [laughter]

54:12

>> Not at all. No.

54:14

Well, plus your level at the the stack

54:17

if you will because you're building a

54:19

language. It might argue that someone

54:21

really needs to understand at least one

54:23

person. Ideally the whole team needs to

54:24

understand those fundamental parts,

54:26

right? Oh, absolutely. I mean and and

54:29

it's

54:30

language is interesting in the in the

54:32

world of AI because AI

54:35

like a lot of like this this

54:37

conversation. We wouldn't have this

54:38

conversation if it wasn't for languages

54:40

because how would AI get to determinism

54:43

without programming languages, right? I

54:45

mean AI is by design stochastic and

54:49

indeterminate. It might give you a

54:51

different answer the next time you ask

54:54

it the same question either just because

54:56

random or because there's a new model or

54:58

there's a whatever. It's non it's not

55:01

the it's there's no determinism. Yet

55:04

we can't build applications if they're

55:06

not if they have non-deterministic

55:08

behavior. I mean what would a banking

55:10

app look like if it like decided to

55:12

hallucinate or or whatever, right? So

55:14

you have to have

55:16

something that where the rubber meets

55:18

the road and where you can reason about

55:21

and and where you can replicate the

55:22

behavior every time you run the app the

55:24

same thing happens. Absolutely. I mean I

55:27

even see it in a bunch I think almost

55:29

all AI agents or tools these days when

55:32

you ask it

55:33

something to do with data, often times

55:35

it will start writing a Python program

55:37

because I think the AI designers figured

55:40

out that you at some point want to turn

55:43

some non-deterministic into a

55:44

deterministic and exactly What is

55:46

exactly the thing that we know most

55:48

efficient? You don't ask it for the

55:50

answer, ask it to write a program that

55:52

computes the answer.

55:54

And and you will know that that that

55:56

will be deterministic. Yes, exactly.

55:58

Yes. Yes.

55:59

>> It's it's very interesting. But speaking

56:01

of

56:03

languages for for AI, I had a question

56:05

that comes up, of course, because AI is

56:07

everywhere is generating a lot more

56:09

code. What is your take on either

56:12

modifying existing languages for AI

56:14

usage based on what you're seeing with

56:16

the patterns or potentially coming up

56:18

with Would it make any sense to come up

56:20

with a language that is more suited for

56:21

AI agents to use? Well, my flip and

56:24

answer there is, you know, that

56:27

the language that's most suited for AI

56:28

is the language that AI has seen the

56:31

most of in its training set, right? And

56:34

that's why you could argue AI does

56:36

really well on JavaScript and TypeScript

56:39

and Python because it's seen an awful

56:41

lot of it and there's an awful lot of

56:43

that still and then and then so and that

56:45

just reinforces itself, right? And and

56:48

you can argue, well, the reason

56:49

TypeScript and JavaScript are are

56:51

popular, well, that's mostly to do with

56:53

the browser and not so much to do with

56:54

AI, right? But it's interesting to look

56:56

at why is AI targeting TypeScript versus

56:59

just JavaScript? And there I think the

57:02

types actually help guide the AI

57:05

um to to producing better programs. And

57:08

I think our combination of

57:11

the ability to type something when

57:13

there's no context,

57:15

but also the our ability to infer it

57:18

when there is context is just the right

57:21

combination because if you were to force

57:24

AI to write a type annotation on

57:26

everything,

57:27

then it would probably get it wrong more

57:29

often

57:30

because now it has to keep track of all

57:32

these types and and it and it has to

57:34

just repeat itself over and over and

57:36

over, right? And so, types are important

57:39

where there's no context. But inference

57:41

is super important for for the dry or do

57:45

not repeat yourself principle, right?

57:46

And and and fewer tokens generally makes

57:49

AI more efficient and so so I think we

57:52

have a very nice combo there in in how

57:55

how you can just sort of type the

57:57

outermost parameter and then everything

57:59

flows

58:01

from there on in, right? Now, one one

58:04

thing that AI is already resulting in,

58:06

again, for the GitHub team share stats,

58:08

so this is also open data that AI agents

58:11

are generating a lot more code. I mean,

58:13

they're both quick to generate, they

58:15

also like to be sometimes verbose. Uh

58:17

knowing that we are already seeing a lot

58:19

more code pushed everywhere and and from

58:22

at a project level, at a at an aggregate

58:24

level, what do you think language

58:26

characteristics could become more

58:28

important in this world of of just a lot

58:31

more code often times generated by

58:33

machines. I mean, you could argue that

58:35

we we're already past peak truth on the

58:38

on the on the internet, right? And now

58:40

there's there's just more and more

58:41

garbage every every day. It gets harder

58:44

and harder to suss out the stuff that

58:47

you do want to include in the training

58:49

set in order to actually make something

58:51

more intelligent. So I think that's that

58:53

gradual I mean,

58:55

I'm sure people are working on it. I

58:57

could see that as as as becoming

58:59

problematic. Languages that are suitable

59:01

for AI I I think like I talked about

59:03

types and inference. I think both of

59:05

those are important. I think also

59:08

locality is is important. Locality?

59:12

Well, what I mean by that is like don't

59:14

have a bunch of global stuff where AI

59:18

has to grok the entire product or these

59:20

pounding glue files that are oh my god,

59:22

well, who knows where they're in scope

59:24

and and how

59:25

do I put that in the context window or

59:27

not? And then then do I burn like a

59:29

gazillion tokens on on trying to include

59:32

but

59:33

but if you have good locality where you

59:35

you clearly stating what you're

59:36

importing and whatever and and you can

59:39

analyze just a single source file and

59:41

from that extract its protocol to the

59:44

outside world without having to to know

59:46

anything deeper. Do you do you know what

59:48

I mean? I think those are important

59:50

aspects

59:51

just simply to reduce the size of the of

59:54

the of the context window and also make

59:57

it easier to summarize each module in a

60:00

program, right?

60:02

>> This is so fascinating because I

60:03

remember this was probably 15 years ago

60:06

where PHP was very much critiqued for

60:09

its globals. And early on I didn't

60:11

understand as a young developer why that

60:13

was a big deal. I was I was just hacking

60:15

on in PHP until I had the issue of

60:17

something was not working and turns out

60:20

that something imported over with a

60:21

global and suddenly you realize that

60:23

when things are defined across the code

60:25

base a global could be anywhere and

60:27

there's no way for you to to know when

60:30

someone else is doing you're now back to

60:32

the state problem which you just

60:34

talked about. Original JavaScript

60:36

suffered from this problem. There were

60:37

no modules, right? Everything was global

60:39

and anyone could just like monkey patch

60:41

anything else and

60:43

and it was impossible to know really

60:44

what what what what am I sitting on top

60:46

of here? But now with ECMAScript modules

60:49

and whatever we're we're we're moving

60:50

towards sanity and more and more the

60:52

world is written that way in the

60:55

JavaScript ecosystem and that's a good

60:56

thing and I think that will help us down

60:58

the line with with AI. AI today

61:02

it's just starting to to

61:05

become aware of you know the existence

61:07

of of of language services and agents

61:11

today like to use grep and awk and

61:13

whatever you know to to find all the

61:15

places where you reference a certain

61:16

thing but it's not semantic search,

61:18

right? And so so if you have a a common

61:21

name for this property like count or

61:25

address or or whatever, right? Well,

61:28

it's going to find a whole bunch of

61:29

properties named address, and then that

61:31

that's not going to work so well,

61:32

because now you you don't know that

61:34

you're renaming the right one, right?

61:35

But this is where language services come

61:38

in and and semantic search. And I think

61:41

that's going to increasingly become more

61:42

important with AI. And really the these

61:45

are services that are already provided

61:47

by LSP implementations.

61:49

But they may need some tweaking in order

61:52

for them to be more accessible to AI. AI

61:55

likes command-line tools, you know, and

61:57

they're not really command-line tools.

61:58

And I also wonder if if for example

62:00

performance will be interesting because

62:02

we know that these things can can run

62:05

faster, so faster feedback is will be

62:06

clearly helpful, which we're now going

62:08

back to type one of the reasons that

62:09

TypeScript was so popular is that the

62:10

200 milliseconds of getting you

62:12

feedback, right? But there are ways of,

62:14

you know, where where you can imagine,

62:16

you know, like a server keeping a

62:19

project hot and and giving your LSP

62:22

services, you know, that AI can ask

62:25

semantic questions and and whatever. And

62:27

then once AI stops asking that for 10

62:29

minutes, the server just dumps it, you

62:31

know, and and whatever. So, there there

62:32

are ways of putting this together, I

62:34

think, where we can make some progress

62:36

on on because like the ability

62:40

for AI to semantically validate the code

62:42

that it's generating as it's generating

62:44

it will increasingly become important.

62:46

What about the the software craft?

62:49

You've you've you've been in this

62:50

industry for for many decades, but it's

62:53

hard to unsee that these tools are just

62:55

coming to everyday use, similar to how

62:58

at some point graphical IDEs came before

63:00

that. I guess the higher-level languages

63:03

came.

63:04

Knowing that AI agents and AI tools will

63:07

be part of the craft, what do you think

63:09

parts of software engineer craft will

63:10

become less important and what might

63:11

become more important? In a sense, we're

63:14

all turning into project managers,

63:16

right?

63:17

And and we can have an army of junior

63:20

programmers called agents that will just

63:23

spit out reams of code,

63:25

but someone's got to have the big

63:26

picture

63:27

and review all of that. And so,

63:29

increasingly our craft is going from one

63:32

of

63:33

writing the code to one of of reviewing

63:36

the code and and building the

63:39

architecture of the code and overseeing

63:42

the work, if if you will. It's a

63:44

different kind of craft. It's a

63:46

different kind of enjoyment. I've always

63:48

liked writing the code.

63:51

You know, to me that was the fulfilling

63:52

part, seeing it work. Do you know what I

63:54

mean? And and it in in a in a way AI

63:57

robs a little bit of that, right? I

63:59

mean, because I I I am less interested

64:02

in reviewing code, but I think we could

64:04

also make the process of review of

64:06

reviewing code much more interesting

64:08

than it is today, right? I mean, today

64:10

you see a list of of diffs in

64:12

alphabetical order and and now it's up

64:15

to you to to make heads or tails of it.

64:17

I mean,

64:18

there are more pedagogical ways of

64:21

presenting that and and you could have

64:23

commentary generated by the AI that

64:25

tells you what the changes are and

64:27

whatever and then tries to guide you

64:28

along. Do you Do you know what I mean?

64:30

So, so that symbiotic relationship, I

64:32

think we we need to work on that more

64:34

and so sort of to to to keep the

64:37

enjoyment in there, but I think it's

64:39

foolish to think that AI will just

64:41

eliminate programmers and that because

64:43

ultimately that's

64:45

you know, like like vibe coding is

64:47

wonderful as long as it works. And then

64:49

the minute it it goes off track, then

64:51

you're like you have no idea what's

64:53

going on and you can't convince the AI

64:55

to fix it. And so, what do you do?

64:57

You can't absolve yourself from

64:58

understanding what's going on. That

65:00

that's not that's not programming. And

65:03

ultimately also, you know,

65:05

the responsibility for a program does

65:07

not lie with the AI. It lies with the

65:10

programmer.

65:11

You're not going to go back to the eye

65:13

and say, "Shame on you. I'm going to

65:15

fire you."

65:16

>> [laughter]

65:17

>> What does that even mean, right? I mean,

65:19

now you have nothing, you know, it's No,

65:21

you need someone to have that

65:24

that function of being responsible. And

65:26

so so that's you know, so so ultimately

65:29

AI is a tool to enable us to become more

65:32

productive, I think. But it will change

65:35

the way that we write our programs, for

65:36

sure. I mean, there's no point in

65:38

in in in sitting there and typing in

65:40

stuff that AI could type 100 times

65:42

faster, you know. Having created three

65:45

very widely used programming languages,

65:47

what have you learned about developers,

65:49

about what they care about when it comes

65:52

to programming languages and stuff that

65:53

maybe they don't care too much about or

65:55

don't even think about it, but you might

65:57

have to think a lot about? You know, I

65:59

think at the end of the day developers

66:00

care about being productive. They care

66:02

about being in the zone, where they feel

66:04

like, "Oh, yeah, this thing is just

66:06

clicking for me. It's doing just the

66:08

right thing and it's like answering me."

66:10

But it it's it's right there. It's an

66:11

extension of my fingertips, right? So,

66:13

for me as a as a language designer, I'm

66:15

never just looking at the language. It's

66:18

you're looking You got to look at the

66:19

whole picture.

66:20

The whole experience. Because really

66:23

what you're doing is you're creating an

66:24

experience. An experience that

66:26

programmers will spend the majority of

66:29

their working life in.

66:31

Which is why my programmers become so

66:34

attached to their tools, you know, and

66:36

their languages, right? I mean, it's

66:38

it's almost a religious thing for which

66:40

language you're on, which tool you're

66:41

using, and because it's it's so

66:44

ingrained in your workflow and and it so

66:46

enables you to to be in the zone, right?

66:49

So,

66:50

that I think is the

66:52

that's the key to focus on and that's

66:54

what I've tried to do with with the with

66:56

the the work that I've done over the

66:58

years. And it sounds like this is why

67:00

from the very beginning you also focus

67:01

on the IDE, the the tool where

67:03

developers spend their time in. Yeah,

67:06

you can't have one without the other.

67:07

Well, you can, but but it's just not

67:10

it's not nearly as effective. Yeah, one

67:12

question we're starting to see or it's

67:14

more of a question mark is, well, how

67:16

much are we going to be in the IDE all

67:18

day versus these new interfaces which

67:20

might be agents where you can manage

67:23

multiple things or command line which is

67:25

again the just something where we found

67:27

that agents can work asynchronously, but

67:28

I think we're still figuring out as an

67:30

industry of like what

67:32

what will come next. Yeah, I don't know

67:34

that we can see the steady state at this

67:36

point cuz it's it's it's evolving so

67:38

much, but I still believe that that

67:41

programmers are going to be relevant in

67:43

in in this equation, you know, I I I I

67:46

fundamentally believe that. What about

67:48

performance and efficiency? Early on in

67:50

your career, you just mentioned that

67:52

your first computer you've had on how

67:53

many kilobytes it had and how you you

67:56

fit your compiler into 12 kilobytes

67:58

which these days I I cannot even create

68:00

a text

68:01

a text file that's smaller than that I

68:03

or it's very hard to do, right? But it

68:05

seems in those year in the you know,

68:07

like few decades ago, writing efficient

68:09

programs was important and over time my

68:12

perception is that it's becoming less of

68:14

a focus. What is your take on that and

68:17

do you think it's kind of fine for us

68:20

developers to forget about efficiency or

68:21

we're just allowed to do that because of

68:24

we have more resources or

68:26

maybe this will change.

68:27

I think it's a case of it depends. There

68:30

are certain classes of apps for which

68:33

efficiency is absolutely key. I mean,

68:36

the the kind of program that my group

68:38

works on like compilers, tooling, and

68:41

whatever. Yeah, people do care. That's

68:42

why we're we're spending a year and a

68:44

half moving to native code. Inference in

68:46

in the cloud on the up against the line

68:49

I mean, oh my god, you know, like

68:50

financial fast trading whatever. It's

68:53

all about perf, right? I mean, at the

68:56

speed of light and like trying to trying

68:58

to move your trade faster than the other

69:00

guys. I mean, so so there are lots of

69:02

places where perf is king. But, there's

69:04

increasingly also places where where

69:06

perf doesn't really matter because, you

69:08

know,

69:09

it's so fast anyway that if it even if

69:12

it's 10 times slower, you still can't

69:14

detect a difference.

69:16

And so, it's just not worth optimizing

69:18

there anymore. It depends, I think, on

69:20

on on the kind of app you're building.

69:22

The It's a good reminder that not all

69:24

use cases are are born equal. I'm

69:26

interested, what is your personal

69:27

development setup like these days? Well,

69:30

I'm an old Windows guy. I still I still

69:33

Windows is my desktop. I have a Lenovo

69:36

P1. You know, I like I like just keeping

69:39

everything portable. So, I don't have a

69:41

big screen or whatever. I just put this

69:43

is like, you know, what, 15 16-in laptop

69:45

with a nice OLED screen and a nice

69:48

keyboard. And that's that's

69:50

what I do my coding on, you know, pretty

69:52

much exclusively. And what what tools do

69:54

you use? Oh, I use VS Code. VS Code. VS

69:58

Code all day, every day. VS Code and and

69:59

GitHub all the time. Yes. Yes. Yes. And

70:02

and for for AI coding assistants? It's

70:04

mostly the GitHub and and VS Code stuff.

70:08

So, which means, you know, I mean, well,

70:09

you can you get to choose your your your

70:12

LLM there, right? I mean, but it's that

70:14

workflow, I think, generally speaking.

70:16

It's limited how much we've been able to

70:19

use LLMs in implementing our compiler

70:22

and implementing new language features.

70:24

It's like

70:26

it just it's it's good at surface-y

70:29

stuff. But, when it comes to like

70:31

getting the big picture and how do

70:34

types and symbols and binding and

70:36

parsing and all relate and where's

70:38

what's the most efficient data structure

70:39

here and and whatever, it's, yeah, it

70:42

it's not quite to that level. I'm also

70:44

wondering if the lower you go into the

70:46

stack, may that be very high-performance

70:48

code or or very concise code where all

70:51

these things matter, maybe the

70:52

applicability starts to drop. Because

70:55

again, we know we we already see this

70:56

LLM's, they're amazing for green field

70:58

work. When you have an existing large

71:00

application, it's it's useful, don't get

71:02

me wrong, but it's not nearly as useful.

71:04

Yeah, and and we are one big brown

71:06

field. Uh

71:08

>> [laughter]

71:08

>> Uh because, you know, we already have a

71:10

huge code base, right? And it's got a

71:12

it's got to fit in there. Plus, I mean,

71:15

to be honest, I mean, there are only so

71:17

many compilers in the training sets of

71:19

of of AI where where there's a gazillion

71:22

GUI apps written in React and and

71:24

whatever, right? So, no wonder it's good

71:25

at those, right? I was interested in

71:28

reflecting a little bit on your career.

71:30

You've now been at Microsoft for for 30

71:32

years, and you've been working on

71:34

programming languages for 40. That's

71:35

even a lot to to say, but in this

71:38

industry, it's pretty common for people

71:39

to change jobs every 3 to 5 years or so.

71:42

What has kept you at a company for for

71:46

so long and also in in a similar area

71:49

for even longer? Well, there's there's

71:51

just something about developer tools

71:52

that that is just

71:55

what I love to do, you know? And and

71:57

programming languages and they're

71:58

they're

72:00

they're complex, uh algorithmically

72:02

complex problems to solve, and I I I for

72:05

some reason like that. They have fewer

72:07

dependencies on other things, so you're

72:09

you're you're building from the bottom

72:11

yourself. Do you know what I mean? You

72:12

don't have to like sit on top of someone

72:15

else's framework and and and swear at

72:17

them when they when it doesn't do what

72:18

you want it to do, right? So,

72:21

so that kind of works for me, right? But

72:23

but the thing is like doing programming

72:25

languages, you come to realize it's a

72:27

long play.

72:28

I mean, if if you look back at the the

72:31

stuff I worked on, it it it goes in

72:33

10-year cycles at least. And TypeScript

72:36

didn't really, for example, or C# for

72:38

that matter. I mean, it took it it takes

72:41

10 years to get to, you know, version

72:43

one is great, but it has all sorts of

72:45

issues, and then you got to do version

72:46

two, and then it's not until version

72:48

three that it really starts to be great.

72:49

But then now you got to convince people

72:51

to actually adopt it and

72:53

and and it it's just it's a long play.

72:56

You got to be willing to do the long

72:57

play. Um and I think like having been at

73:00

a at a company like Microsoft is is it's

73:03

it's been great because to be put in a

73:05

position where a company like Microsoft

73:07

is putting their might behind your

73:09

efforts on creating a programming

73:11

language. That's not an opportunity you

73:12

get in a lot of places, right? And that

73:14

has been fantastic. But also, you know,

73:16

the fact that Microsoft is fundamentally

73:19

a developer-focused company. And they

73:21

they always have been.

73:22

>> Yeah, that's how they started, right?

73:23

>> Developers matter. It's not It's not

73:25

advertisers who are who are who are

73:26

paying the bills. It's It's developers

73:28

and enterprises that, you know, and and

73:30

I like that like where you feel like

73:32

you're doing an honest day's work and

73:33

people are paying you for it and it's

73:35

it's good stuff, you As closing, what

73:38

what is a book that you would recommend

73:39

and why? I always recommend the same

73:42

book, which is Niklaus Wirth's Programs

73:44

plus Data Structures uh

73:46

um

73:47

equals algorithms. It's actually like

73:49

available online now. Uh it was written

73:51

in the '70s, but that was the book that

73:54

It was a revelation for me to read this

73:56

book. This is how I how I

73:58

learned about hash tables and the how to

74:01

construct a small compiler and and

74:03

whatever. And it was it was just

74:04

wonderful. It's very light on symbolism

74:07

and very rich on examples and and and I

74:10

was always an engineer, and so that book

74:13

just appealed to me. And I think it's

74:15

still in in in in a lot of ways super

74:17

relevant today. The basics have not

74:19

changed, have they? Too much. No, no,

74:21

and I know certainly and and

74:23

particularly when it when it when it

74:24

comes to programming languages, heck,

74:26

it's it's a it's a well-established

74:28

discipline, quite honestly. Yeah, it's

74:30

been around for 50-plus years. Well,

74:32

Anders, thank you so much for this

74:34

in-depth conversation. Oh, my pleasure.

74:36

This was a lot of fun.

74:37

I hope you enjoyed this rare

74:38

conversation with Anders as much as I

74:40

did. An interesting part I keep thinking

74:42

back to is how Anders said that

74:43

programming language design is a 10-year

74:45

cycle at minimum. Version one has

74:47

issues, version [music] two fixes them,

74:49

version three is finally great, and then

74:52

you have to convince people to actually

74:54

adopt [music] it. Most of us devs are

74:55

used to thinking in quarters and

74:57

sprints. This is certainly a different

74:59

time frame. I also found it surprising

75:01

to hear how small the C# language design

75:03

team was

75:03

>> [music]

75:03

>> and how lean that they worked. Six to

75:05

seven people, three meetings per week,

75:07

two hours each. All of them were people

75:09

who had built languages before and they

75:11

were criticizing each other's ideas. And

75:13

ideas that survived the criticism were

75:15

the ones considered good enough to work.

75:17

Which is a good reminder that standout

75:18

technical work more often comes from

75:20

small [music] teams than it does from

75:21

committees. Finally, I really like how

75:23

Anders said that IDEs are the language.

75:25

From Turbo Pascal in the 1990s to

75:27

TypeScript and VS Code today, Anders

75:30

says that the compiler is not the

75:31

product. The product is the whole edit,

75:34

compile, run, debug cycle. This is a

75:36

good reminder to any and all of us

75:37

building software. [music] The product

75:38

is the complete way that your customers

75:40

use the product, not just the screens or

75:42

parts that you are responsible for. If

75:44

you'd like to go deeper on Microsoft's

75:46

developer tool [music] roots and

75:47

operating systems, check out the related

75:49

Pragmatic Engineer deep dives linked in

75:51

the show notes below. If you've enjoyed

75:52

this podcast, please do subscribe on

75:54

your favorite podcast platform and

75:55

[music] on YouTube. A special thank you

75:57

if you also leave a rating on the show.

75:59

Thanks and see you in the next one.

Interactive Summary

Anders Hejlsberg, a pivotal figure in programming language development, discusses his journey from creating Turbo Pascal and Delphi to C# and TypeScript. He explains Turbo Pascal's success due to its speed and integrated development experience, and how C# emerged from the legal battles surrounding Java and the need to unify developer platforms at Microsoft. He delves into the design philosophies behind C#, emphasizing object-orientation, managed code, and a unified object system. The discussion then shifts to TypeScript's rise, highlighting the critical role of its erasable type system and open-source approach in enabling superior tooling and developer productivity, especially with VS Code. Hejlsberg also shares his insights on the impact of AI on programming, noting how it automates drudgery and shifts the developer's role towards reviewing and architectural oversight, while underscoring the importance of determinism and language features like types and locality for AI. Throughout, he emphasizes that developer productivity and the complete "experience" of programming are paramount, a lesson learned over 40 years of language design, which he describes as a "long play" requiring a decade to achieve maturity.

Suggested questions

7 ready-made prompts