Slashdot Mirror


TypeScript: Microsoft's Replacement For JavaScript

mikejuk writes "Everyone seems to have a replacement for JavaScript — Google even has two. Now Microsoft has revealed that Anders Hejlsberg, the father of C# among other languages, has been working on a replacement and it has released a preview of TypeScript. The good news is that it is compatible with JavaScript — you can simply load JavaScript code and run it. JavaScript programs are TypeScript programs. To improve on JavaScript, TypeScript lets you include annotations that allow the compiler to understand what objects and functions support. The annotations are removed by the compiler, making it a zero overhead facility. It also adds a full class construct to make it more like traditional object oriented languages. Not every JavaScript programmer will be pleased about the shift in emphasis, but the way it compiles to a JavaScript constructor is fairly transparent. At this early stage it is difficult to see the development as good. It isn't particularly good for JavaScript developers who already have alternatives, and it isn't good for C# developers who now have confirmation that Ander Hejlsberg is looking elsewhere for his future." Update: 10/01 20:34 GMT by U L : It's also freely available under under the Apache 2.0 license, and there's a language specification available. It looks pretty interesting: it even has ML-style type inference (including e.g. deducing the types of higher order functions).

2 of 488 comments (clear)

  1. Re:Remember the old addage by gweihir · · Score: 1, Offtopic

    Is it just me or are the MS shills getting even more stupid?

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  2. Re:Remember the old addage by Anonymous Coward · · Score: 0, Offtopic
    if you took microsoft out of this story you would have no argument against it which is why your post is complete drivel. you seem to have an inability to look at the facts because everything you see is colored by your view of microsoft, if this were closed-source or under some microsoft shared source license then you may have a point, but it isn't, it is open source and the code is available, you can download it yourself if you want. in fact it emits javascript and if you don't think it is conformant you can fork a version and change it.

    if you want to spread FUD and dismiss facts as "astroturf" go right ahead but it just demonstrates that you have no understanding of open source.