alsimoneau@lemmy.catoPython@programming.dev•Astral is building a new static type checker for Python, from scratch, in Rust
14·
3 days agoI never understood the need for a Python type checker. If I wanted static typing I would code in Fortran.
I never understood the need for a Python type checker. If I wanted static typing I would code in Fortran.
Thanks for the answer. It is a genuine question.
But don’t you loose polymorphism? It seems like a big trade-off. For context I’m a scientist doing data analysis and modeling, so my view point is potentially significantly different than most of “the industry”.
Your points 1-3 are handled by running the code and reading the error messages, if any. For 4-5 “ugly” code will be unreadable wether it’s typed of not. For 6 refactoring now necessitate to change the types everywhere, which I imagine could be error prone and increase code inertia. And for 7 it would definitely slow down developpement untill you get familiar with the libraries and have tooling to automate stuff.
I can understand the appeal for enterprise code but that kind of project seems doomed to go against the Zen of Python anyways, so it’s probably not the best language for that.