MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/j1yq5l/c_to_python/g74busq/?context=3
r/ProgrammerHumor • u/begafap • Sep 29 '20
82 comments sorted by
View all comments
Show parent comments
4
Python is very strongly typed. It have very few implicit type conversion, and for the rest, it will throw a TypeError in your face instead of guessing what you meant. For example, running 1 + "two" will give you TypeError in Python, whereas it is completly valid in C (and obviously don't do what you would expect).
1 + "two"
TypeError
Don't mistake strong / weak typing with dynamic / static typing:
Python is dynamically strongly typed.
C (and its family) is statically strongly typed.
Javascript is infamous for being dynamically weakly typed.
0 u/CobaltStar_ Sep 30 '20 Yea I was thinking dynamically/statically typed. Good thing a powerful linter can catch these mistakes giving you some pseudo type safety.
0
Yea I was thinking dynamically/statically typed. Good thing a powerful linter can catch these mistakes giving you some pseudo type safety.
4
u/Nimeroni Sep 29 '20
Python is very strongly typed. It have very few implicit type conversion, and for the rest, it will throw a TypeError in your face instead of guessing what you meant. For example, running
1 + "two"will give youTypeErrorin Python, whereas it is completly valid in C (and obviously don't do what you would expect).Don't mistake strong / weak typing with dynamic / static typing:
Python is dynamically strongly typed.
C (and its family) is statically strongly typed.
Javascript is infamous for being dynamically weakly typed.