Hacker News new | ask | show | jobs
by orting 4313 days ago
I dont like this paper. It makes statements based on references to opinion style articles. F.ex

"in practice, run-time type errors in deployed programs are exceedingly rare [TW07]."

If we look at [TW07] they state that

"even very simple approaches to testing capture virtually all, if not all, the errors that a static type system would capture."

But provides no data or reference for that statement.

Another isue is that some references with data are based on small samples and possibly oudated:

"they [dynamc languages] lower development costs [Ous98]"

[Ous98] Compares time-to-implement and code-size for 8 different programs implemented in static and dynamic languages and shows that the dynamic languages are supperior. It is however not clear how much actual implementation is involved, so it may be the case that the difference is caused by diferences in available libraries at the time. In any case, the sample size is small and the article is old (1998) so it is not reasonable to make generalisations for programming in 2009 (or 20014).

[TW07] Laurence Tratt and Roel Wuyts. Dynamically typed languages. IEEE Software, 24(5):28–30, 2007.

[Ous98] John K. Ousterhout. Scripting: Higher-level programming for the 21st century. Computer, 31(3):23–30, 1998.

1 comments

Informally, dynamically types languages are chosen when the programmer prefers to get something running before getting something running correctly. Why would we assume then that once a program is running, the programmer would "find religion" and do the extra work to write a comprehensive test suite? If the programmer is willing to do work in an effort to prove correctness, the programmer would choose the far more efficient technique of rewriting the program in a statically typed language.

A dynamically typed program by its very nature a prototype, a program that is expected to fail when exposed to a non-trivial input. In many cases, that is fine, just not when correctness over many invocations actually matters.

> Informally, dynamically types languages are chosen when the programmer prefers to get something running before getting something running correctly.

I don't think that's at all true. I think that a major motive for choosing dynamic programming languages is that programmers want to get things running correctly and spend more time on the logic and less on making ritual invocations to the type system that are redundant with other elements of the code. (Haskell and other similar languages with very strong type inference are making this a less compelling reason to choose a dynamic language, but I think it remains an important one for many real decisions, as Haskell hasn't yet acheived the ecosystem and mind-share where its always likely to be considered as an alternative, and not rejected for reasons other than its type system.)

I think people who choose static languages do so because of concerns for correctness, but I think it is a mistake to reverse that to conclude that those who choose dynamic languages do so because they aren't concerned with correctness; many do so because the hoops you need to jump through in mainstream static languages are perceived as being a too-expensive way to get the (often very limited, given the lack of expressiveness in the type systems in many popular static languages) help in correctness that the static nature of the language provides.

I think that programmers reasons for choosing a specific language are as varied as the languages.

Personally I like programming in C++ because the typesystem and abstraction mechanisms allows me to write reasonably correct and concise code and at the same time performance is predictable. I like programming in Python because of the emphasis on readability, the "batteries included" standard library and the scripting capabilities.

Both languages have failings, as do all the other I have tried, but what matters most (for me) is availability (platform support, libraries etc), which is the reason I occasionally write php code.