by BiteCode_dev · 4y ago · 0 comments
The ergonomics improved a lot and it's now usable, so the cost ratio/benefit is worth it today.
But barely.
Even assuming you use the latest Python version (lots of project can't), you still have to import tons of things you use all the time like Iterable, Self, Callable and so on.
Then you have to deal with with the poor Protocol solution for duck typing, aggressive defaults, mypy slowness (before 9.13 it's terrible, after it's just bad and mypyd is quickly mandatory) and a surprisingly high number of bugs (such frustrating time wasters). Add on that false positives, low support from some popular libs and incompatible type checker implementations, and you get a very much meh experience. Very far from the awesomeness on Python.
If you are unlucky and have to use anaconda, mypy dependencies make it extra fun to include.
Still, I'm glad it exists. It's still very useful. But thank god hints are optional.