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

Chris Lattner

๐Ÿ‘ค Speaker
See mentions of this person in podcasts
2524 total appearances

Appearances Over Time

Podcast Appearances

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so the zero cost cost is so high, right?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so that means you can't actually use exceptions in many libraries.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And even for the people that do use it, well, okay, how and when do you want to pay the cost?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

If I try to open a file, should I throw an error?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Well, what if I'm probing around looking for something, right?

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

I'm looking it up and made different paths.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Well, if it's really slow to do that, maybe I'll add another function that doesn't throw an error or turns an error code instead.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And I have two different versions of the same thing.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so it causes you to fork your APIs.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Yeah.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so, you know, one of the things I learned from Apple and I still love is the art of API design is actually really profound.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

I think this is something that Python's also done a pretty good job at in terms of building out this large-scale package ecosystem.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

It's about having standards and things like this.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so, you know, we wouldn't want to enter a mode where...

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

You know, there's this theoretical feature that exists in language, but people don't use it in practice.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Now, I'll also say one of the other really cool things about this implementation approach is that it can run on GPUs and it can run on accelerators and things like this.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And that standard zero cost exception thing would never work on an accelerator.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

And so this is also part of how Mojo can scale all the way down to like little embedded systems and to running on GPUs and things like that.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Yeah.

Lex Fridman Podcast
#381 โ€“ Chris Lattner: Future of Programming and AI

Yeah, so the way to think about it is think about a function that doesn't return anything, just as a simple case, right?