TypeScript and Microsoft MVP

Recently Microsoft announced yet another way of writing JavaScript called TypeScript, which looks interesting and appealing to me.

No one less than Anders Hejlsberg himself demonstrated his version of ECMAScript (let's name it JavaScript) called TypeScript. His arguments are clear and precise:

  • No new language should require builds and wrappers, before you can use existing JavaScript code / libraries.
  • JavaScript is so popular due to dynamic typing, i.e. if one really wants that he should be able to use it. However, static typing is less error prone, can be re-factored more easily and is easy to use in combination with intelli-sense.
  • The syntax that is added should be in the direction of the latest version of JavaScript (like the current ECMAScript 6 proposal). Other syntax should be used just for declarations and not for transformations.

So far I like the features of TypeScript. The class definitions as well as the interfaces for declaring structures of objects as well as the lambda expressions with the fat arrow syntax for representing this-conservative callbacks is really sweet.

The only problem I still see is the requirement for transpiling (or let's name it compiling), before you can go to production mode. I'd like to see the following feature added to the next / current IE (10): TypeScript as optional scripting language. Since JavaScript is a subset of TypeScript, IE could just use TypeScript as scripting language. Any good old JavaScript will compile - but now TypeScript as well.

The question now is: where is the advantage? First of all: IE is used internally for "compiling" Metro apps that have been written in JavaScript - those apps can then be written in TypeScript, which is far better (think about namespaces... or more complex apps that require classes and would be less error prone with static typing). Second one could write a simple module for any script language / ASP to handle requests from unknown browser with a transpiler for TypeScript files, while just returning the TypeScript code to the latest IE. Hopefully other browsers will (in the future) then implement TypeScript as well.

If Microsoft believes in the idea of TypeScript, then it will give developers the opportunity to role out TypeScript files without being compiled to plain JavaScript. I doubt that the failure of VBScript (which was a horrible scripting language) is going to happen again, especially since the advantages of TypeScript are quite obvious.

On a final note: I yesterday received an E-Mail from Microsoft stating that my MVP package is on the way! I would like to thank all the people reading my articles, inviting me to talks, giving me the opportunity to hold lectures or contacting me for consulting jobs. Thanks a lot for your faith and encouragement!

Created . Last updated .


Sharing is caring!