I'm excited; this looks better than Pyre. It being in Typescript is ironically enough a pretty big deal.<p>I think they're clearly writing this for vscode, right? I hope they are at least. Having spent the last decade and half writing Python code, I have completely stopped enjoying writing Python code (even typed Python) because of how <i>good</i> TypeScript and the VSCode typescript experience is. It doesn't even sort of compare.<p>At this point I just want pretty much the same thing that happened to JS to happen to Python: For MS to make a Python superset with <i>good</i> type hinting (not the atrocious pep484 syntax) which compiles down to Python.<p>… and wasm. Which compiles down to Python and wasm.
Microsoft, Facebook, and Google all have their own Python type checkers now.<p>* <a href="https://github.com/google/pytype" rel="nofollow">https://github.com/google/pytype</a><p>* <a href="https://github.com/facebook/pyre-check" rel="nofollow">https://github.com/facebook/pyre-check</a>
I just installed it. It gives red squiggly lines under variables that haven't been assigned (typos) and for incorrect methods on variables it can type-deduce. This is without me adding any typing-hints to the script I'm working on.<p>Only issue I see immediately is it does not use the default sys.path that the vs-code-configured python interpreter uses, so it cannot resolve some of the packages I'm using.<p>But overall, very nice.
Microsoft, please make one for Ruby! C# vet and lover of VS and VS Code, now working on a legacy Ruby/Rails code base and hating a new life of lifecycle callbacks, fat controllers, fat models, magic methods, and un-upgradeable gems. Ugh.
> Pyright is written in TypeScript and runs within node. It does not require a Python environment or imported third-party packages to be installed.<p>I know which of those environments I would prefer... it's not node. It makes total sense for VS Code though, so fair enough.
As someone who has worked with Eric Traut (the primary author of this from what I can see) in a previous life, I will say you can take this to the bank any day of the week. One of the best developers out there
I could see this being nice if you work within VSCode, have to juggle many Python versions, and already have Node installed, but I've personally had no issues with speed or configurability with mypy and pyenv. I think it's an interesting project, but probably half-baked at this point.
Flame mode on.<p>Can anybody explain to me why people seem to prefer using unsafe and interpreted/slow languages (Python, Ruby, Javascript... which is only fast now because companies have invested millions on it) and then spend a ton of resources writing "type checkers" for these inherently unsafe languages (Typescript, Pyre, Pyright) Why don't they simply use languages that are already safe and fast by design? (Rust, OCaml...)
I think this is great! Static typing is such a blessing. This one looks very high quality. Static typing helps me read code and helps the compiler do static analysis. What's not to like?
I still don't understand adding type checkers to dynamic languages beyond Javascript, where there was no other alternative. I view the gradual type checker craze as an admission that dynamically typed languages are a failed experiment. So why would you not just switch to a language that's designed with static typing in mind.
Can this be run in real time in VSCode? How hard would it be to write a vim plugin for this? I haven't done any vim scripting in a while - is it possible nowadays to run a process asynchronously, so that you could essentially run this tool on every keystroke?
Now that we have type hints and statically typing in Python, I hope to see an open source Python compiler, that improves performance and produces single file binaries.