Chris Lattner
๐ค SpeakerAppearances Over Time
Podcast Appearances
Okay.
So that means you put a lot of time into compatibility and it means that you get locked into decisions of the past and
even if they may not have been a good thing, right?
Now, systems programmers typically like to control things, right?
And they wanna make sure that, you know, not in all cases, of course, and even systems programmers are not one thing, right?
But often you want predictability.
And so one of the things that Python has, for example, as you know, is that if you define a variable, you just say x equals four.
I have a variable named x.
Now I say some long name equals 17.
Print out some long name.
Oops, but I typoed it.
Well, the compiler, the Python compiler doesn't know, in all cases, what you're defining and what you're using.
And did you typo the use of it or the definition?
And so for people coming from type languages, again, I'm not saying they're right or wrong, but that drives them crazy because they want the compiler to tell them, you typoed the name of this thing.
And so what FN does is it turns on, as you say, it's a strict mode.
And so it says, okay, well, you have to actually declare, intentionally declare your variables before you use them.
That gives you more predictability, more error checking and things like this, but you don't have to use it.
And this is a way that Mojo is both compatible, because DEFs work the same way that DEFs have always worked, but it provides a new alternative that gives you more control and allows certain kinds of people that have a different philosophy to be able to express that and get that.
It depends.
Again, it depends on your mentality, right?