News for hackers. Stuff that matters.
Re:JavaScript is not suitable for large web apps by gruseom on Thursday June 14, 2012 @06:21PM (#4113831)
Is there any credible data on static vs. dynamic typing?
Re:JavaScript is not suitable for large web apps by paganel on Thursday June 14, 2012 @07:47PM (#4114183)
I'm not a specialist on this topic (i.e. I'm only a programmer, not a computer scientist), but I don't seem to remember any links posted to relevant such studies in any of the "static vs. dynamic typing" flame wars.

Also, a little bit OT, I've been a professional programmer for 7 years now (i.e. getting paid to write code) and to this day I'm not sure 100% what's the difference between "0", "NULL", "None" or an empty string. What type does "None" belong to? Can I compare it to the integer 0?

Re:JavaScript is not suitable for large web apps by anentropic on Monday June 18, 2012 @11:23AM (#4126817)
"I've been a professional programmer for 7 years now (i.e. getting paid to write code) and to this day I'm not sure 100% what's the difference between "0", "NULL", "None" or an empty string. What type does "None" belong to? Can I compare it to the integer 0?"

been doing PHP by any chance? ;)

Re:JavaScript is not suitable for large web apps by artsrc on Thursday June 14, 2012 @08:24PM (#4114309)
Yes. A couple of weeks back on either hacker news or reddit (I just searched, and could not find it quickly), there was a seemingly well conducted experiment, with a large number of students randomized to static and dynamic languages, that found no statistically significant difference.
Re:JavaScript is not suitable for large web apps by neilk on Thursday June 14, 2012 @09:23PM (#4114480)
Actually, the study found that static languages were worse. They tested students on two problems. In one there was no significant difference, and in the other the static language performed worse.

Here is that study: "An Experiment About Static and Dynamic Type Systems", by Stefan Hanenberg, University of Duisberg-Essen, 2010.

http://www.cs.washington.edu/education/courses/cse590n/10au/...

However, they didn't use existing languages; they created a brand new language and IDE that had a typed and untyped variant. Whether this confounds or strengthens the case is unclear to me.

In any case, I think any survey of static type systems that doesn't include a language with type inference is very flawed. Java's type system is an annoyance in the small, and is a mixed bag in the large. Haskell's type system is a totally different story.

Re:JavaScript is not suitable for large web apps by gruseom on Thursday June 14, 2012 @10:00PM (#4114562)
If you look at the HN thread where that paper was discussed, people on both sides were shooting holes in it. That's partly why I'm asking, is there anything solid on this out there at all? People are just repeating the same beliefs over and over. We've all heard them a zillion times and we all divide them into two categories: "shit I agree with" and "bullshit".

What experiments could be done to test these beliefs?

Re:JavaScript is not suitable for large web apps by alexscheelmeyer on Friday June 15, 2012 @06:43AM (#4115855)
I think one would need to start by testing a different question first : "With everything else being equal, should your language choice be affected by the level of competence of the developers?". It seems discussions on topics like this all boil down to clash between the idealist and the pragmatist. Idealist: "I want to use language X because it is powerful and lets me to Y". Pragmatist: "but that feature will be abused by the average developer and your project will suffer". So you can't win. Either you have to work in a mediocre language that the mediocre developer knows how to use, or you will work in a great language that the mediocre developer will use to shoot you in the foot. If the answer to the above question is no, then we can put this discussion to rest - otherwise we will need to probe further and understand how developer competence should guide your language choice.