Menu
Sign In Search Podcasts Libraries Charts People & Topics Add Podcast API Blog Pricing

Anders Hejlsberg

๐Ÿ‘ค Speaker
701 total appearances

Appearances Over Time

Podcast Appearances

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

Oddly, it isn't until this port to go now that we're switching to LSP.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

We had our own precursor of LSP because LSP didn't exist when we first integrated TypeScript into Visual Studio Code.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

But there were a lot of learnings from that.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

So it's been an incredibly symbiotic and fulfilling experience to build these two

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

projects in parallel in open source.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

And I think it has totally changed people's view of Microsoft in the developer ecosystem.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

Sure.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

It's in many ways a fairly typical compiler and in many ways not.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

Pretty much every compiler has what's known as a lexer or scanner that takes text and turns it into tokens.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

And then typically on top of that, you have a parser that takes the tokens, checks their sequencing, and then makes abstract syntax trees, which is a tree that you can navigate that effectively is a map of

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

of the source code, you know, but broken into syntactic primitives and checked that, you know, like syntactically everything is, or grammatically that everything is correct.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

So those are the first two stages of the pipeline.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

Then we have, well, we have one extra pass that we call the binder, which is, you know, once we have the parse trees, then we bind symbol information to them where we find all of the, all of the declarations.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

up variables and whatever, and build simple tables and attach them to their functions such that we can then later look up names effectively.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

And we also build in the binder, we build a control flow graph, and I can talk about what that helps us do.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

And then we have the type checker, which is the largest part of our pipeline.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

And that's the thing that checks.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

semantically that your program is correct.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

It's the thing that figures out types and checks that the types relate correctly and that you're assigning the right thing to the right thing.

The Pragmatic Engineer
TypeScript, C# and Turbo Pascal with Anders Hejlsberg

And then that, you know, that you're calling something that actually exists and so forth.