TypeScript: Still a long way to go

I think TypeScript does a lot of things right.

A step in the right direction…

Unlike CoffeeScript or Dart, Typescript doesn’t want to completely replace Javascript with a new syntax. While one may argue, and I would agree, that a complete replacement of the Javascript syntax is the best course for the future of web, the reality doesn’t allow it. 

Fact is browsers implement only Javascript. Given the popularity of the language, and the fact that any other language has to compile down to JavaScript, all non Javascript language users will have to learn Javascript anyway. And once they have learned one language (Javascript), which is highly popular and mainstream btw, there is little incentive to learn something different. 

Any attempts to discard Javascript would be met with too much friction for TypeScript to gain mainstream adoption. Typescript realizes this fact, and is a complete superset of Javascript. By making all existing Javascript code part of TypeScript by default, this sets TypeScript on a correct course to try to evolve it into something better. 

That said TypeScript still has a long way to go to become the ‘new Javascript’.

Still long ways to go…

TypeScript’s main strength is that it adds types to Javascript, which IDEs can make use of to offer all the ‘auto-magicness’ that Java and C# IDEs have enjoyed. Without great IDE support, the additions offered by TypeScript become more of a hindrance than convenience (try writing ‘imports’ in Java without the auto-import feature of Eclipse/Intellij and you will see what I mean).

But TypeScript being Microsoft’s baby, as you can imagine, currently the IDE that best supports it is only Visual Studio. However, the commercial, Windows only nature of Visual Studio wont do much to spread the language. There are plugins for TypeScript in other IDEs/editors like Webstorm and Sublime Text, but again they are not near the implementation of Visual Studio and suffer some of the same problems as Visual Studio (eg Webstorm is not free). 

What is needed

It is good to see an ecosystem evolving around TypeScript in other IDEs. But in order to become ‘the new Javascript’, TypeScript needs to have at least one A+ level implementation in an IDE that is:

  • Free
  • Cross Platform
  • Is mainsteam itself

Currently Eclipse satisfies that criteria. However, the open source plugin available for it is not high quality enough. It would serve Microsoft well to create and fund a project with the Eclipse Foundation for TypeScript.

Conclusion

I think TypeScript is a step in the right direction. However, Microsoft will need to spend significant resources to help create free, cross platform, high quality tooling that exploits the advantages of TypeScript before TypeScript can become the ‘new Javascript’.