5 ms·
If you write more code that is untyped than typed, you are harming whoever comes after you. Untyped code is an absolute dragon even if it is properly documented
by krageon 5y ago
If you write more code that is untyped than typed, you are harming whoever comes after you. Untyped code is an absolute dragon even if it is properly documented (which it practically never is). Glorifying "productivity" and putting it above the greater good is essentially everything that's wrong with the world, at every level.
- notpachet 5y agoprogramming languages : diehard dynamic typing advocates :: global pandemic : mask mandate protesters
- bayesian_horse 5y agoThere is no conclusive and objective evidence that static typing helps at all. Studies are at best inconclusive, certainly a far cry from confirming the superiority of static typing. Everything else is subjective. To have a recent and complete opinion about the one thing you necessarily need to have less of a recent and complete experience with another. The benefits of masks against spreading respiratory viruses are easily and objectively proven. Completely different thing.
- notpachet 5y agoWell, while you're waiting for that study to ride down from heaven on a white horse clad in gold, the rest of us are going to just quietly get on with being (subjectively) more productive.
- _Algernon_ 5y agohttps://link.springer.com/article/10.1007/s10664-013-9289-1 https://link.springer.com/article/10.1007/s10664-013-9289-1
- CraigJPerry 5y agoThat’s quite a strongly worded opinion. It sounds like it should be utterly trivial in this case to show that typed code causes less harm. I’m happy with whatever definition of harm you’re happy with. So where can i review the data supporting such a strongly worded position?
- krageon 5y agoYou can review it by talking to people that inherit your code, especially if they're still acclimating to it :)
- bayesian_horse 5y agoSo you don't have any hard data either...
- oriolid 5y agoOn a quick search, for example https://link.springer.com/article/10.1007/s10664-013-9289-1 https://link.springer.com/article/10.1007/s10664-013-9289-1. "This paper describes an experiment that tests whether static type systems improve the maintainability of software systems, in terms of understanding undocumented code, fixing type errors, and fixing semantic errors. The results show rigorous empirical evidence that static types are indeed beneficial to these activities, except when fixing semantic errors." is pretty much as strongly worded as scientific journals can accept.
- CraigJPerry 5y agoCool - this paper has 3 conclusions: - Static type systems are an effective form of documentation – Static type systems reduce the effort to fix type errors – Static type systems may not be helpful in preventing semantic errors It would have been awesome to have evidence for #3 but even just #1 & #2 could be useful, albeit to a much lesser extent. Could we quantify by how much? It’d be important to quantify because if static types mean a developer can be done sooner, then they have spare time to spend improving the software. So do these differences with static types translate into benefits for the developer? The author of that paper says no. He published this other paper just after that one: https://www.ics.uci.edu/~jajones/INF102-S18/readings/23_hanenberg.pdf https://www.ics.uci.edu/~jajones/INF102-S18/readings/23_hane...
- oriolid 5y agoFor the second paper, looks like the test task is quite small and the language used requires more work from developer than a modern static type system with type inference and generics. Still the difference between static and dynamic typed variants is rather small. I wonder if the situation would change if the project took weeks or months instead of hours, but that would be an expensive experiment. Also, it would be interesting to see if type inference and generics would increase productivity but in the real world we are stuck with Java and Go anyway. Other take home message is that the famous 10x programmer was found in both groups. The one with dynamic language was faster, just as the argument for dynamic typing goes.