| > 1. A program is run more times than it is compiled (hopefully). So the goal is really to make the effective combination of the two more efficient in a given usage scenario. You're not counting development time, or rather, cost. Even if I eventually need the efficiency of a statically typed language, dynamic languages let me save the time that I would have spent satisfying the type checker on code that didn't make it into that version. > On the other hand, with a dynamic typed language, if N seconds are shoved away from compilation, at least N seconds will be added to run-time. It's unclear that that's true. In fact, the cost of compile-time type checking is typically more than the cost of run-time type checking during much of development. > Run-time errors take longer to detect and correct and the process of doing so is bound to see less automation. Run-time errors aren't detected until run-time but since folks with dynamic languages get to run-time faster, they're often detected earlier. As to "less automation", I don't see it. Do you have an automated system that corrects type errors? |
>> Even if I eventually need the efficiency of a statically typed language, dynamic languages let me save the time that I would have spent satisfying the type checker on code that didn't make it into that version.
This conversion does not sound so trivial to me generally. At times converting from a dynamic language to a statically typed language requires either a change of code architecture or a massive refactoring operation.
>> Do you have an automated system that corrects type errors?
Not corrects, just detects. I have at times faced issues when code runs for half-an-hour and then crashes just because a the given object could not be converted to the needed new type at run-time. My reaction: "Sigh! I wish the compiler told me earlier during compile-time!"