Tuesday, October 09, 2012

TypeScript

So, it's been a little while since Microsoft release a preview of their new language... TypeScript.

My first reaction was "Aren't there already a bunch of replacements for JavaScript (Dart, CoffeeScript, Kotlin, etc.) that just compile to JavaScript anyway? Why would Microsoft create yet another variant?" After looking at it a little deeper, it became clear that it isn't a replacement for JavaScript (vanilla JS is valid TypeScript), but an enhancement on top of the existing language to support static type checking at development time, (arguably) better syntax for creating closures/'classes', etc., while producing ECMAScript 5 compliant output that can be used in any browser/host/OS combination already in existence today (no plugins required).

After reading more, I found an article that sums up my thoughts nicely: Thoughts on TypeScript

It'll be interesting to see how this progresses. If nothing else, perhaps it will spur the adoption of the ECMAScript 6 proposals into the full spec sooner rather than later!

No comments: