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 by doing that, what you can say is you can say, OK, if I'm defining something weird, like an atomic number or something, it's like, eh.

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

So an atomic number is an area in memory that multiple threads can access at a time without locks.

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

And so the definition of an atomic number is multiple different things have to be poking at that, therefore they have to agree on where it is.

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

So you can't just like move it out from underneath one because it kind of breaks what it means.

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

And so that's an example of a type that you can't even, you can't copy, you can't move it.

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

Like once you create it, it has to be where it was, right?

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

Now, if you look at many other examples, like a database sample, right?

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

So, okay, well, what happens

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

How do you copy a database handle?

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

Do you copy the whole database?

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

That's not something you necessarily want to do.

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

There's a lot of types like that where you want to be able to say that they are uniquely owned.

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

So there's always one of this thing.

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

Or if I create a thing, I don't copy it.

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

And so what Mojo allows you to do is it allows you to say,

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

hey, I want to pass around a reference to this thing without copying it.

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

And so it has borrowed conventions.

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

So you can say you can use it, but you don't get to change it.

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

You can pass it by mutable reference.

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

And so if you do that, then you get a reference to it, but you can change it.