2 ms·
> If you want types, use something else other than Python. Python is still strongly typed. Me: what type does this argument need to be? Python: you have to f
by forrestthewoods 5y ago
> If you want types, use something else other than Python.
Python is still strongly typed.
Me: what type does this argument need to be?
Python: you have to figure that out
Me: I just pass whatever I want?
Python: Oh no. Usually only a single specific type is supported. But you have to guess what it is.
Me: what if I get it wrong?
Python: the program crashes at runtime
- lifewallet_dev 5y agoYou don't understand what "strongly typed" means... I give you a hint, `"1" == 1` is a type error in Python but "okay" in JavaScript because this one is "weakly typed", you're confusing "dynamic typing vs static typing" with "strongly typed vs weakly typed".
- forrestthewoods 5y agoPython is a strongly, dynamically typed language. Most Python type errors could be caught by a static analyzer. If Pythons type hint system wasn’t a disappointment it would help more people catch more bugs when they’re written. Instead Python endlessly throws exceptions at runtime because a programmer got their types wrong. Thanks for the hint.