Monthly Archives: October 2012

Much Ado About TypeScript

The web world has been alive with conversation this week about TypeScript, Microsoft’s latest language offering which builds upon JavaScript. Funnily enough I visited Adelaide this weekend to catch up with my friend Darren Neimke and his family. I worked with Darren at Readify and he has more than a decade of experience with the .NET platform but more recently he has been immersing himself in the Google platform – including the Dart language.

We talked a bit about the merits of the language and the approach that the Dart team had taken around designing a language executing within a JavaScript execution environment. My feedback was that I felt that Dart would come into its own when they finished the server execution environment and enabled Dart within Google AppEngine (at the moment it only supports Java, Python and Go).

Then to our joint surprise Microsoft shipped TypeScript earlier this week, a JavaScript superset language which takes a very similar approach to Dart. TypeScript is a language specification, with a  supporting compiler that produces JavaScript. The TypeScript compiler is open source and written in TypeScript – which means that the TypeScript compiler can run in any JavaScript execution environment. Microsoft provides tooling that plugs into Visual Studio but Darren and I successfully got an Ubuntu server up and running, pulled down Node, and got the TypeScript compiler running.

What I do like about the approach that Microsoft is taking here is that they are trying to ensure that they don’t break all of the JavaScript libraries that we know and love. Instead, TypeScript adds a sprinkle of extra syntax to JavaScript, and in some cases are simply a progression along the lines of existing standards efforts.

The truth is that Dart is significant for Google because as a platform vendor they need to have their own server language. Microsoft already have a few languages that they own that have good adoption (existing .NET languages).

If I was Google, I would do what Google has done, and if I was Microsoft, well, I’m not sure that I would have bothered with TypeScript – but now that it is here it might encourage developers to look no only at TypeScript, but also other languages that build upon JavaScript to execute within the browser. TypeScript also adds some extra power to Microsoft’s Node hosting platform within Windows Azure without breaking compatibility with the APIs that come out of the box with the Node engine.

Interesting times indeed.