Chris Lattner
๐ค SpeakerAppearances Over Time
Podcast Appearances
Sure, you can add a type.
If you don't care, you're prototyping some stuff, you're hacking some things out, you're like pulling some random code off the internet, it should just work.
And you shouldn't be pressured.
You shouldn't feel bad about doing the right thing or the thing that feels good.
Now, if you're in a team, you're working at some massive internet company and you have 400 million lines of Python code, well, they may have a house rule that you use types because it makes it easier for different humans to talk to each other and understand what's going on and bugs at scale.
And so there are lots of good reasons why you might want to use types.
But
That doesn't mean that everybody should use them all the time, right?
So what Mojo does is it says, cool, well, allow people to use types.
And if you use types, you get nice things out of it, right?
You get better performance and things like this, right?
But Mojo is a full compatible superset of Python.
And so that means it has to work without types.
It has to support all the dynamic things.
It has to support all the packages.
It has to support list comprehensions and things like this.
And so that starting point, I think, is really important.
And I think that, again, you can look at why I care so much about this.
And there's many different aspects of that, one of which is the world went through a very challenging migration from Python 2 to Python 3.
This migration took many years, and it was very painful for many teams.