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.

2 thoughts on “Much Ado About TypeScript

  1. Joe Wood

    Microsoft needed TypeScript to address issues with JavaScript that they have for tooling and WinRT. JavaScript is a first class language for Windows 8 based apps – but windows developers expect good tooling like intellisense and refactoring. That’s not easy in a dynamic typing language.

    What’s great about TypeScript is that existing JavaScript is valid TypeScript. The onboard adoption is much cheaper and easier than other recompiled langauges like CoffeeScript and even Dart. For this reason I would expect TypeScript to see more adoption than Dart.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s