2 ms·
Last time I argued, like the TFA does, that Python's typing system is both too complex for casual users and useless for power users ("it doesn't do anything" is
by the_af 4y ago
Last time I argued, like the TFA does, that Python's typing system is both too complex for casual users and useless for power users ("it doesn't do anything" is about right), and that this makes it hard to evangelize its use to other devs who aren't sold on type systems ("but this doesn't do anything!"), I got into a 30-level nesting flame war with some HN regular who just wouldn't let go.
So that's still my line of thought, but I'm already regretting typing this on HN.
- Atlas22 4y agoYeah, I think I agree with you. I still find it curious that the python language server is quite capable of inferring types from unannotated code yet most of the type checking tools for python seem to explode as soon as they encounter an very popular yet untyped library. I guess typing is more of an afterthought than a priority for most dynamic language developers so it doesn't get much love.
- kcartlidge 4y agoSounds like an opportunity for a type checker that uses the language server.
- dragonwriter 4y ago> Sounds like an opportunity for a type checker that uses the language server The language server itself uses a typechecker, so you'd just be building a typechecker that uses another typechecker by a roundabout route.
- kcartlidge 4y agoIt's turtles all the way down. Though in seriousness I'd presume it would be bad type checker uses language server which uses better type checker, which may help with the problem.
- dragonwriter 4y ago> I still find it curious that the python language server is quite capable of inferring types from unannotated code yet most of the type checking tools for python seem to explode as soon as they encounter an very popular yet untyped library. There are multiple python language servers, but if you mean the Microsoft one, well, that just incorporates one of the best of the Python static typecheckers (Microsoft’s pyright)
- Atlas22 4y agoYeah I was indeed referring to Pylance, the Microsoft one. I was unaware that pyright was used under the hood, thanks.
- ianandrich 4y agoToo complex for casuals and not powerful enough for power users is a phenomenal way of putting it.