10 ms·
One of the core requirements of the type hints design is that they don't affect the Python language. You can still write python programs without them. You can
by BiteCode_dev 7y ago
One of the core requirements of the type hints design is that they don't affect the Python language.
You can still write python programs without them.
You can add them only partially.
You can also add them later.
Python stays Python.
MonkeyType lets you take a code base that is untyped, or partially typed, for historical or because it was not worth it at the time, and turn it into a fully typed project quickly.
It makes the transition between the exploration phase into the industrial phase much easier.
For me, it's kinda fantastic to be able to fiddle with a design, changing my mind again and again, without having to fight the type system, then once things are settled, add an additional safety net on top.
It's also very reassuring knowing I can just hack things, knowing that later on, if I want to take it to the next level, I have the option to change my mind about type hints.
- Browun 7y agoTotally get that, and agree that this is an aspect if Python that is awesome for iteration on new ideas without many barriers. However, this seems to make the assumptions that when you, as you say, transition to the industrial phase: - MonkeyType will get all of the assumped types correct, which at any scale I doubt. Not because of the ability of the projects contributors, but because they warn about this in their own documentation - If you're doing this at an industrial scale, and you haven't already documented/thought about/understood what these functions are. I'd appreciate that it may help intially, but still runs in to the problem I was discussing above.