Ask HN: What's stopping us from having full static validation of Python code?
2 points| diegojromero | 2 months ago
I was wondering, how far are we with providing such a high level of static checks for interpreted languages that almost all issues can be catch statically? Is there any work on that on any interpreted programming language? What would you like to be statically-checked in Python?
[1] https://github.com/diegojromerolopez/mypy-pure
[2] https://github.com/diegojromerolopez/mypy-raise
vintagedave|2 months ago
I’ll check out your repos. Can you share more about what they can and can’t do, your approach, your goals…?
diegojromero|2 months ago
Now, what I am asking is, could we expand this by having static annotations that enforce runtime behaviours before running the code? I'm not advocating for the removal of the tests or some manual testing phase, but in the same vein of type errors being shown in our IDE, could we have static checks like contracts for functions or class invariants?
Full disclaimer: I leveraged AI technologies to create them.