Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API 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

You're not going to hurt my array.

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

Yeah.

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

Now, that is an interesting and very powerful design principle.

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

It defines away a ton of bugs.

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

You have to be careful to implement it in an efficient way.

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

Generally not, if you implement it the right way.

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

But it requires a lot of very low-level getting the language right bits.

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

Well, the trick is you can't do copies.

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

So you have to provide the behavior of copying without doing the copy.

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

Yeah, how do you do that?

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

How do you do that?

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

It's not magic.

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

It's just, it's actually pretty cool.

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

Well, so first, before we talk about how that works, let's talk about how it works in Python, right?

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

So in Python, you define a person class, or maybe a person class is a bad idea.

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

You define a database class, right?

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

And a database class has an array of records, something like that, right?

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

And so the problem is that if you pass in a record or a class instance into the database, it'll take a hold of that object, and then it assumes it has it.

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

And if you're passing an object in, you have to know that that database is gonna take it, and therefore you shouldn't change it after you put it in the database, right?

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

This is the problem.