In association with heise online

02 October 2012, 11:50

TypeScript: Microsoft's enhanced alternative JavaScript

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

TypeScript lofo Microsoft has announced a preview of TypeScript, its own superset of enhancements for JavaScript. Working on an alternative to JavaScript seems to be in vogue. A year ago it was Google's Dart, and now with TypeScript, it's Microsoft's turn. C#, Turbo Pascal and Delphi creator Anders Hejlsberg is involved with the language, together with Steve Lucco, the developer behind Microsoft's Chakra JavaScript engine, and Luke Hoban, who is involved in ECMAScript standardisation. Hejlsberg has apparently spent the last two years working with the JavaScript superset, which offers static typing, class constructs and modularisation. TypeScript differs from Dart in that developers do not have to learn a new language, but, as with CoffeeScript, can continue to use JavaScript and only have to wrestle with those ideas which are TypeScript specific.

The decision to work on an enhanced JavaScript version, with features from object-oriented programming languages such as Java and C#, was driven by the perceived difficulties involved in writing large, scalable applications in JavaScript which often found developers writing in other languages with developed tool ecosystems and translating to JavaScript. TypeScript starts with JavaScript and aims to offer JavaScript developers better code analysis, more sophisticated debugging, easier refactoring and simpler navigation of large program constructs. Much of the additional functionality provided by TypeScript has been aligned with the changes in the forthcoming version of ECMAScript.

The new language is JavaScript-compatible. JavaScript developers can employ whatever TypeScript components they wish. These might, for example, include flexible annotations which tell the compiler the intended purpose of the objects and functions used. Once the compiler has processed and removed these annotations, the TypeScript compiler produces standard JavaScript able to run in a browser.

TypeScript's specification is licensed under the Open Web Foundation's OWFa 1.0 Specification Agreement while the TypeScript compiler can be used under the Apache 2.0 licence. There is also documentation in the form of a Word fileDirect download or a PDF filePDF. Hejslberg has also posted a lengthy video introduction to the language on Channel 9. Microsoft already has a Visual Studio plugin available which offers IDE support to TypeScript developers.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1721841
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit