Do We Need Static Typing?


Don’t get me wrong, I like statically typed programming languages. And I am with Anders who recently stated that large JavaScript programs are unmaintainable.

But lately I am asking myself if we could extend a live coding IDE (like the upcoming light table) so that most of the static type information can be inferred from the test runs only?

I think that a strong interaction between the compiler and the testing environment could reduce the use of static types to an “optimization problem”. Developers would then be motiviated to write more tests to get their types nailed down and the compiler could use that information to generate code that runs faster.