4 ms·
I'm just using it to get my job done, and really couldn't imagine working with Python without it. I'd consider static type checker as optional if you are playi
by watermelon0 6y ago
I'm just using it to get my job done, and really couldn't imagine working with Python without it.
I'd consider static type checker as optional if you are playing around with small or throwaway scripts, but for any half serious project, it should be a requirement.
IME I don't consider it slow, and it's definitely not visibly slower than pylint, flake8, or similar tools for other languages.
Dropbox, which has one of the biggest Python codebases, uses it, and most mypy maintainers including Guido work there.
- you_are_naive 6y agoThe biggest problem with mypy is that it's written in python. It's slow. It needs to be rewritten in rust or go to make it faster like how js ecosystem is moving in that direction. All the tooling is moved to faster compiled languages.
- crazypython 6y agomypy has implementations in other languages – PyCharm's is in Java, Facebook's Pyre's is in OCaML https://github.com/facebook/pyre-check https://github.com/facebook/pyre-check
- MapleWalnut 6y agoThose tools are not re-implementations of mypy, but their own type checkers. Pyre doesn't necessarily have all the features of mypy and vice versa.
- watermelon0 6y agomypy is actually compiled via mypyc, which should be a few times faster than interpreted Python https://github.com/python/mypy/tree/master/mypyc https://github.com/python/mypy/tree/master/mypyc
- wk_end 6y agoInitial type checking with mypy is slow, but if you use mypy-daemon each check after that becomes pretty much instantaneous, even on 10M+ line code bases.
- Twirrim 6y ago> Dropbox, which has one of the biggest Python codebases, uses it, and most mypy maintainers including Guido work there. Guido hasn't worked at Dropbox since 2019. He retired for a bit, but is now in the Developer Division at Microsoft.
- watermelon0 6y agoMy bad, I just checked http://mypy-lang.org/about.html http://mypy-lang.org/about.html, which appears to be outdated.
- bostonsre 6y agoYea, it may slightly slow down the initial draft due to needing to type a little bit more, but it helps speed up maintainability and readability a ton and it helps eliminate a bunch of bugs so I think it has definitely increased productivity in my experience.