4 ms·
As both a dynamic and static type enthusiast, back typing dynamic code is extremely problematic. Fluent use of a dynamic language will use and create constructs
by sitkack 9y ago
As both a dynamic and static type enthusiast, back typing dynamic code is extremely problematic. Fluent use of a dynamic language will use and create constructs that are nearly un-typeable. If you want to make typed code, start typed. If you code with implicit types, use a good type inferred language (ML, F#, etc). If you want to use type checking in Python, use the annotations and MyPy from the beginning.
That said, I am not saying this tool is bad. It could very well help a lot of codebases, but I would warn against using it as part of the operational workflow.
- viraptor 9y ago> Fluent use of a dynamic language will use and create constructs that are nearly un-typeable. Do you mean cases where you accept "anything iterable", an issue with callbacks / template types, or something else?
- joshuamorton 9y ago>Fluent use of a dynamic language will use and create constructs that are nearly un-typeable. Can you give examples? In practice, I haven't noticed this being an issue.
- joshuamorton 9y ago>Fluent use of a dynamic language will use and create constructs that are nearly un-typeable. Can you give examples? In practice, I haven't noticed this being an issue. A lot of python code already had/has docstrings explaining the types, these annotations just formalize that a bit more.