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).

6 of 488 comments (clear)

  1. I am still busy with silverlight by superflit · · Score: 5, Funny

    Sorry..
    I am still busy with silverlight...

    Oooppss. that did not work....

    1. Re:I am still busy with silverlight by Anonymous Coward · · Score: 3, Funny

      In related news, I just released a game in HyperCard.

  2. 0 day exploit found in TypeScript by logicassasin · · Score: 5, Funny

    I'm going to leave this here as a placeholder for the inevitable...

    --
    Fifty watts per channel, baby cakes.
  3. Do you have a karma allergy? by Qubit · · Score: 5, Funny

    Obligatory: http://xkcd.com/927/

    Note: please do not mod this post up.

    Note: please do mod this post up

    --

    coding is life /* the rest is */
  4. Re:CoffeeScript, Dart and this - screw it all by neminem · · Score: 5, Funny

    Yeah, well, you sound like a... person who... isn't very good at comebacks.

    Also, your mom.

  5. Re:Remember the old addage by Tough+Love · · Score: 4, Funny

    Just keep calling it "ECMA Script" until it sticks.

    For some reason, "ECMA" always makes me think of "ACNE". Now it will for you, too ;-)

    You're welcome.

    --
    When all you have is a hammer, every problem starts to look like a thumb.