Growing pains for typing in Python
Growing pains for typing in Python
Posted Jan 17, 2024 23:17 UTC (Wed) by Paf (subscriber, #91811)Parent article: Growing pains for typing in Python
As someone who comes to Python exclusively from typed languages, it is fascinating to me watching what I think is - frankly - a process of the language "growing up" and becoming more suitable for larger projects. It is also fascinating to have people argue against something which is happening by itself - Python is growing type checkers because *people see them as beneficial* (which they obviously are, for all sort of frankly obvious reasons). It's OK if the core Python developers want Python to be something else, but this steady growth of typing related tools? That's the actual usage telling you something.
Duck typing is a really fun way to program small stuff quickly. It's a laughably bad idea for large projects. I think Python is doing a pretty good job of striking a balance, but they're going to have to keep working at it, because typing is incredibly important for large programming projects. The path forward is almost certainly going to be towards more typing, because that's what the language doesn't have. Duck typing works great.
So it seems to me the question is can Python find a way to continue having both. It will likely require a more fulsome embrace of typing by the core developers so they can give it more careful attention rather than continuing to let the type system be defined by external tools. (It's amazing to read the bits where there are now multiple tools with *conflicting views of typing* but *it's important not to break them*. This way lies madness and the only way out is greater integration and - optional, sure - enforcement by some part of the core tools.
If the type system is basically enforced by a bunch of weird side projects, that's... it's just not going to go well over time.
