6 ms·
Mypy is the standard, but too slow to integrate into editors (more appropriate for CI). PyCharm built its own implementation for this reason, but of course it's
by gipp 8y ago
Mypy is the standard, but too slow to integrate into editors (more appropriate for CI). PyCharm built its own implementation for this reason, but of course it's proprietary. Pyre's trying to get typecheck integration into other editors.
- sametmax 8y agoI got mypy plugged in on VSCode. It works very well. You don't get error reporting at the very second you type things but it never bothered me. I was more annoyed that it was practically unusable for years. Saner defaults, bug fixes and new types made it finally useful in late 2017.
- klibertp 8y agoWhy do you think it's too slow? I have it integrated with Emacs' flymake and it works pretty well. It takes less than a second to run mypy and display its results (with red underline or whatever else you have configured). From my experience, Visual Studio with F# takes similar time to type-check and show errors.
- zokier 8y agoA second is an eternity for interactive use.
- klibertp 8y agoOk, I don't know myself, because I stopped looking for the next editor years ago, so I'd like to ask: do you know how long it takes, on average, for IDEs and editors to highlight a type error?
- m45t3r 8y agoWell, I am start to writing some Typescript with tslint configured on save, and it takes way more than 1 second for a small toy project. Even just building this project with Typescript compiler takes more than 1 second. And I don't think it is that bad because at least the process is async.
- elbear 8y agoInteresting. I write TypeScript in PyCharm and I get feedback as soon as I write (PyCharm performs save automatically). I don't know how they implemented it that it's so fast.
- komon 8y agoWell, PyCharm is already doing a lot of parsing for syntax highlighting and autocompletion and other goodies. They're checker implementation probably just takes the AST PyCharm already has available to it, which saves the round-trip of saving to a file and having an outside checker open and re-parse the file.