5 ms·
> Python is in fact a type safe language for a while now I like the idea of type annotators but they do not make it a type safe language because types are not
by kbumsik 7y ago
> Python is in fact a type safe language for a while now
I like the idea of type annotators but they do not make it a type safe language because types are not checked and they are more like comments.
Python will remain a dynamically typed language, and the authors have no desire to ever make type hints mandatory, even by convention.[1]
[1]: https://www.python.org/dev/peps/pep-0484/#non-goals https://www.python.org/dev/peps/pep-0484/#non-goals
- chc 7y agoThis is only true if you don't use a type checker. If you do use a type checker...types are checked. It's still not really a sound type system, though. Many safe languages have some kind of escape hatch for the type system, but the escape hatches are very close at hand in Python's typing and you see them used several orders of magnitude more often.
- Too 7y ago-Wall -Werror is also optional in GCC... Not that i like it but just to show that a lot of languages require a properly set up configuration and CI-infrastructure to make them safe and useful. mypy should be considered equal to -Wall -Werror and anyone who doesn't run it is frankly a bloody idiot.
- luord 7y agoYour entire reason for calling people not doing what you do "bloody idiots" stems from your opinion that static typing is superior. It isn't, you're just contributing to a flamewar that has been going on since computers have been a thing.