3 ms·
Static 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.
by wudangmonk 4y ago
Static 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.