Guido van Rossum
๐ค SpeakerAppearances Over Time
Podcast Appearances
Just that part of the world.
I guess people have nothing better to do in those long, cold winters.
I don't know.
I think Jukka lived in England when he invented that stuff, actually.
MyPy is the original static type checker for Python, and the type annotations that were introduced with PEP484 were sort of developed
together with the static type checker.
And in fact, Yuka had first invented a different syntax that wasn't quite compatible with Python.
And Yuka and I sort of met at a Python conference in, I think in 2013.
And we sort of came up with a compromise syntax
that would not require any changes to Python and that would let MyPy sort of be an add-on static type checker for Python.
I think he was using Angular brackets for types like in C++ or Java generics.
Well, the key thing is that we already had a syntax for annotations.
We just didn't know what to use them for yet.
So type annotations were just the sort of most logical thing to use that existing dummy syntax for.
But there was no syntax for defining generics directly syntactically in the language.
MyPy literally meant my version of Python, where my refers to Yuka.
He had a parser that translated MyPy into Python by doing the type checks
and then removing the annotations and all the angular brackets from the positions where he was using them.
But a preprocessor model doesn't work very well with the typical workflow of Python development projects.
It's not necessarily a split.