4 ms·
I use Python for machine learning, but I wish I could use a friendly, modern, statically-typed language like Kotlin, Swift, etc. instead. Dynamically typed lang
by blt 9y ago
I use Python for machine learning, but I wish I could use a friendly, modern, statically-typed language like Kotlin, Swift, etc. instead. Dynamically typed languages feel scary beyond around 1000 lines of code.
- XorNot 9y agoPython 3.6's optional types are pretty great. Block out your solution first then start constraining it where you need to.
- icebraining 9y ago+1, I recently wrote some data extraction and processing code using pandas and mypy, and it was pretty great. And progress is happening to add types to numpy and pandas themselves.
- riku_iki 9y agoYou still have many not type annotated libraries in ecosystem, and poor support of refactoring/navigation in IDEs.
- terminalcommand 9y agoThe downside is that static typing makes your programs much more rigid. Even if you program to interfaces, apply open-closed principle etc. After a while you start fighting the type system. That's why I like dynamic typing. Coupled with Python's type annotations for hard cases and good documentation, dynamic typing allows you to go further by reducing cognitive load.