4 ms·
Pycharm has the worst type checker that exists today. It may have been the best a few years back but others have suppressed it considerably. I recently switche
by veber-alex 3y ago
Pycharm has the worst type checker that exists today.
It may have been the best a few years back but others have suppressed it considerably.
I recently switched from Pycharm to vscode which uses pyright and it's night and day on the amount of type errors it catches, it considerably improved the quality of my code and confidence during refactoring.
And to add insult to injury Pycharm doesn't even have a pyright plugin and the mypy plugin is extremely slow and buggy.
- no_wizard 3y agoThere definitely seems to be a few areas since the Fleet announcement that have given me pause on JetBrains. Their Python support has t kept up with other tools as noted. I’ve see a similar decline in the ability for for them to keep up to date with things like Svelte, Vue, Astro etc too. They need to embrace the LSP
- dcgudeman 3y agoIt’s sad to see this happen to be honest. Seems like Jet Brains is getting distracted from their core value proposition: good IDEs. If electron based IDEs are becoming more responsive and performant than their “native” IDEs they have major priority problems.
- krick 3y agoWhat even distracts them? IDEs are supposedly the only thing they do. Well, maybe except for Kotlin. And it's not like their IDEs are very cheap either. I mean, not that cheep that I'd like the idea of being too much mentally invested into something, that barely competes with a free source-code editor, let alone lags behind it.
- throwaway2037 3y agoI'm pretty sure they make most of their money from TeamCity build agents. IntelliJ (the Java+ IDE) always has a community edition that is open source. I can vouch that it is truly free and not crippleware. For most Java programmer, this edition is sufficient.
- maxbond 3y agoI don't actually know but my assumption is that that they're working with a very old codebase based on the "bespoke parsing and plugins for every language" paradigm that served them well for decades. Meanwhile eg VSCode is using the "language server with treesitter and queryable compiler genetically integrated over a standard API" model that's only recently become widespread. When I first learned about LSPs it was immediately clear to me they would run circles around the "traditional" IDEs. I'd given up on using IDEs because I found them too finicky and error prone, but LSPs have been a total game changer.
- kristianbrigman 3y agoThere is Fleet, which they purport to be their next gen IDE. Which I haven’t even tried, though I am am avid pycharm user, so maybe it’s not getting the results they hope for?
- krick 3y agoAny examples? I don't write Python that much nowadays, and while I'm sure its type checker doesn't do everything, I kinda never felt disappointed by what it does. Maybe, a considerable part of that is that I still don't really think of Python as a type-checked language, so everything an IDE does for me still feels like quite a bit of an improvement over how I used to write code in Python for a long, long time. But really, "night and day on the amount of type errors"?..
- veber-alex 3y agoWell on Pycharm 2022.3 which is what I still have installed even this simple function doesn't show any error. def foo() -> int: pass I sure hope they improved the type checker in later versions...
- mathisfun123 3y agoUm lol what do you think the error is here? This is widely accepted syntax for a stub. So yes it does return None if run but it's not expected to ever be run. So pretty ironic that you would blame pycharm (which is indeed excellent) for your own misunderstanding. https://mypy.readthedocs.io/en/stable/stubs.html#using-stub-file-syntax-at-runtime https://mypy.readthedocs.io/en/stable/stubs.html#using-stub-...
- veber-alex 3y ago> Um lol what do you think the error is here? This is widely accepted syntax for a stub. No it isn't. The accepted stub syntax is an ellipses (...). A competent type checker like pyright will error on this code. Function with declared return type "int" must return value on all code paths Type "None" cannot be assigned to type "int" And if you need more proof that pycharm is useless as a type checker: def foo(b) -> int: if b: return 1 A classic error where you forget to return a value from all paths and pycharm is silent.
- mathisfun123 3y ago