TypeScript Debate

TypeScript was launched this month, and as Scott Hanselman notes it’s caused a lot of debate.

It seems a lot of people are prepared to wade in an denounce a system without trying to understand it. A good example is someone on Twitter with this opinion:

It’s about time we leave JavaScript alone and tell the ones who can’t seem to learn it to find another profession. #dart #typescript link

So his belief is that JavaScript is good enough and you don’t need any tooling.

I did reply to this tweet and was accused of personal attacks, when all I did was point out that his personal blog has JavaScript errors.

He misunderstood my meaning, complaining the errors were from code on the host site that was not his code. The point he missed was that JavaScript errors are everywhere. Writing good, reliable, tested JavaScript is very hard, even for professional companies like About.me and Yahoo.

I did a bit of research and found a survey of JavaScript errors in top 100 sites.

I realised @TheMarco must be a JavaScript guru who has gone through the pain of learning all the odd little quirks and techniques of JavaScript. And now he sees neophyte developers just bypassing all this with tools like CoffeeScript, Dart and TypeScript doing all the hard work for them. “It’s not fair!” he rages. A bit like my children.

He is a portrait painter of the nineteenth century, who is suddenly faced with the invention of photography.

Surely anything that makes it easier to write solid, testable code has to be a good thing?