3 ms·
I know I am going to be in the minority, but I don't understand why we can't let Python be Python. Static typing is great, and there are already other staticall
by entropyneur 1y ago
I know I am going to be in the minority, but I don't understand why we can't let Python be Python. Static typing is great, and there are already other statically typed languages for all your needs. Why not use them?
Well, at least it doesn't create two incompatible Pythons like async and (I assume) free threading.
- Galanwe 1y agoI used to be of the same opinion, but after giving type hints a real try, I changed my mind. You should not see type hints as real, hard types, but more as a kind of documentation that helps your linter and type checker catch mistakes.
- Matthyze 1y ago> Why not use them? Because you can now use typing WITH the entire Python ecosystem.
- Ekaros 1y agoI sometimes felt that Python was rather strong in many parts of typing. As such being able to track what type of something is would often have been useful. Instead of waiting it to crash to some error. Like back in 2.7 difference between byte-array and string... Offloading such cases is mentally useful.
- chpatrick 1y agoBecause Python has a lot of things it's great at (numeric stuff, ML, computer vision, scripting), and with types you can actually rely on it to work. It's the best of both worlds.