4 ms·
>Because static typing is only worth the 2% >If you felt it helped it's because it was the placebo effect >Remember the time you mistyped something and the pr
by verroq 12y ago
>Because static typing is only worth the 2%
>If you felt it helped it's because it was the placebo effect
>Remember the time you mistyped something and the program crashed at runtime when it should have been a compile error. That was the 2%.
>There's not one time you passed in the wrong object and duck typing smoothed over the error, until you find it at runtime. That was the 2%.
>Remember the time the compiler made your program faster because it could deduce additional information from the types? That was the 2%.
>Remember the time your IDE helped you write programs, detect potential errors because it could deduce more information from the types? That was the the 2%.
>if you advocate static typing, then you are comparable to a religious zealot.
What a load of garbage.
- lisper 12y agoYou left out the most important part: there is evidence -- in the form of at least one peer-reviewed study -- to support all these claims.
- verroq 12y ago>This paper presents an empirical study with 49 subjects that studies the impact of a static type system for the development of a parser over 27 hours working time. Because all the programs you've ever written were parsers. full text: http://courses.cs.washington.edu/courses/cse590n/10au/hanenberg-oopsla2010.pdf http://courses.cs.washington.edu/courses/cse590n/10au/hanenb... I'm not actually surprised at this result when they forced people to use their toy static typed language, in their toy IDE (which couldn't take advantage of the static typing i.e. intellisense style prompts, type error underlines etc).
- dllthomas 12y agoAnd you never need to refactor them. It's also not clear the sophistication of the type system, or the familiarity of the 49 participants with the type system, whether they were working together or independently, ... But most damning is the line immediately following: "In the experiments the existence of the static type system has neither a positive nor a negative impact on an application's development time (under the conditions of the experiment)." Unless the abstract is tremendously misleading, the paper flat out does not say what TFA claims.
- dllthomas 12y agoAt a closer look (I missed the pdf link, the first time) it seems the abstract is tremendously misleading. Under the conditions of the experiment dynamic typing was faster. Of course, the conditions of the experiment involved a small project in an unfamiliar language with an unfamiliar type system over the course of 27 hours with an unchanging set of requirements, so draw your own conclusions as to how well this generalizes.
- dllthomas 12y agoComparing the description of the paper to the abstract, TFA seems to substantially overstate things. From TFA: "[T]here was a study [...] which found the following to be true in experiments: not only were development times significantly shorter on average with dynamically typed languages, so were debug times." From the abstract: "This paper presents an empirical study with 49 subjects that studies the impact of a static type system for the development of a parser over 27 hours working time. In the experiments the existence of the static type system has neither a positive nor a negative impact on an application's development time (under the conditions of the experiment)."
- dllthomas 12y agoAs I mentioned elsewhere, the abstract seems to disagree with the paper. I'm not sure what conclusions to draw from that fact...
- yawaramin 12y agoIt may be peer-reviewed, but that 2% number remains to be verified independently.
- spion 12y agoNo need - if you open the linked PDF, you'll see that the percentage was arrived at by searching github issues for things like "type error", "argument exception" and so on - in projects written in dynamically typed languages.
- mpweiher 12y agoQED.