3 ms·
I've tried a few times now to do data science in a statically typed language, and I just haven't enjoyed the developer experience. In general I tend to think th
by mumblemumble 4y ago
I've tried a few times now to do data science in a statically typed language, and I just haven't enjoyed the developer experience. In general I tend to think the advantages of dynamic typing are overblown, but this is one problem domain where it seems to be indispensable.
ML and data engineering is a different story, of course. Also, I wouldn't be surprised if something clever could be done with a structural type system.
- siproprio 4y agoWhat languages have you tried, and what in them did not work? What’s wrong with casting variables to mutate their type?
- wudangmonk 4y agoStatic typing is like salt, sprinkle a little bit and it enhances and gives flavor to your food. Too much of it and it completely ruins the dish.
- keyle 4y agoNicely said! Let me try... Types are like guard rails, you don't think you need them till you fly off the road.
- dunefox 4y agoIt only "ruins the dish" if you don't want your dish to be correct.
- wudangmonk 4y agoIts either tasty or salty, never heard of a correct dish.
- galangalalgol 4y agoWhy would you want "a little" static typing? What does that mean? I used to write python in vim and hated it, made tons of mistakes that were time consuming to find. Type hinting religioussly and using pylance in vscode sped me up a great deal. But I still make those mistakes sometimes, and they are still troublesome to find. Sometimes they pass unit tests because the types are off in the test too. I think a compiled strongly and statically typed language with excellent type inference is the best of both worlds, freedom with a safety net. The problem with interpreted or jit languages is that even with strong typing, inference won't save you until runtime. I'm enjoying julia, but finding type errors at runtime is a downside.