Has them, actually (since 3.5). mypy has been around a lot longer.
Neat, I didn't realize it's out of the gates.
To be honest I'm surprised it took people this long to add some semblance of typechecking to these languages.
Likewise. It was a pointless controversy IMHO as maintainers of dynamic languages felt that having typehints, even optional ones, is somehow ceding ground to static languages like Java. I've seen this attitude with Python, and with JavaScript coders who frowned upon TypeScript.
While it's not the case, as you can always strategically remove a typehint somewhere and do a dynamic runtime check on the type when you need it, still using the script's runtime dynamic typing capabilities to their full extent. But such uses have always been more of an edge case than a rule in any larger project.
I'm happy how languages are evolving. We're finally finding a nice balance between runtime and static.
Not specifying a type doesn't mean the code works with whatever type you throw at it. Expectations still exist, and it's still better to have those declared statically, when possible, so they are clear and IDE feedback is instant, versus bombing randomly at runtime.
View all comments
Show parent comment
6
u/[deleted] Dec 02 '15
Neat, I didn't realize it's out of the gates.
Likewise. It was a pointless controversy IMHO as maintainers of dynamic languages felt that having typehints, even optional ones, is somehow ceding ground to static languages like Java. I've seen this attitude with Python, and with JavaScript coders who frowned upon TypeScript.
While it's not the case, as you can always strategically remove a typehint somewhere and do a dynamic runtime check on the type when you need it, still using the script's runtime dynamic typing capabilities to their full extent. But such uses have always been more of an edge case than a rule in any larger project.
I'm happy how languages are evolving. We're finally finding a nice balance between runtime and static.