Chris Lattner
๐ค SpeakerAppearances Over Time
Podcast Appearances
Closures are pretty cool, and you can pass callbacks.
There's a lot of good patterns, and so...
Yeah, this is just a totally syntactic thing.
Yeah, so this is where in Python you can say call a function x equals 4.
Yeah, I mean, and again, this isn't rocket science to implement.
It's just the laundry list.
It's just on the list.
The bigger features are things like traits.
So traits are when you want to define abstract.
So when you get into typed languages, you need the ability to write generics.
And so you want to say, I want to write this function, and now I want to work on all things that are arithmetic-like.
Well, what does arithmetic like mean?
Well, arithmetic like is a categorization of a bunch of types.
And so, again, you can define it in many different ways.
And I'm not going to go into ring theory or something.
But you can say it's arithmetic like if you can add, subtract, multiply, divide it, for example.
And so what you're saying is you're saying there's a set of traits that apply to a broad variety of types.
And so there are all these types of arithmetic, like all these tensors and floating point integer, and like there's this category of types.
And then I can define on an orthogonal axis algorithms that then work against types that have those properties.
And so this is a, again, it's a widely known thing.