4 ms·
Python has had static types for years. https://www.python.org/dev/peps/pep-0484/ https://www.python.org/dev/peps/pep-0484/
by weberc2 7y ago
Python has had static types for years. https://www.python.org/dev/peps/pep-0484/ https://www.python.org/dev/peps/pep-0484/
- TylerE 7y agoYes, because optional annotations are totally the same thing as changing the languages basic functionality.
- weberc2 7y agoOof, that’s quite a take. Static type checkers by definition don’t change the language’s functionality; they merely check the types.
- TylerE 7y agoStatic typing is ceremony. That is anti-Python. If you want Java, write Java. Don't try to make Python Java.
- weberc2 7y agoIt’s literally Python, and if you’re writing sane/correct Python, you should hardly notice (things will work a little better, documentation will be more complete and actually accurate, etc). You can even do many of the same bizarre things that shitty Python programmers do without static typing, such as return differently types data based on the value of an input parameter. Someone passes in the string “asdf” so we’ll return an int, but if they pass “xyzfoo” we return a datetime. Next thing you know you’ve built matplotlib.