10 Comments

Summary:

Javascript is wildly popular but needs enterprise-class capabilities if it’s going to continue to be used to build business applications. That’s why Microsoft is offering TypeScript a superset of JavaScript that adds these needed perks available as a download.

typescript

Microsoft is adding yet another langauge — TypeScript — to a roster that already includes Visual Basic, C# and F#. TypeScript is a superset of JavaScript, a language originally meant to build web pages. The goal is to bring more enterprise class features to JavaScript, the use of which has exploded among corporate developers.

The reason?  It’s time for the scrappy language to grow up to better support the creation of enterprise applications, according to a blog post by S. Somasegar, corporate VP of Microsoft’s developer division.

Somasegar wrote:

TypeScript is a superset of JavaScript that combines type checking and static analysis, explicit interfaces, and best practices into a single language and compiler. By building on JavaScript, TypeScript keeps you close to the runtime you’re targeting while adding only the syntactic sugar necessary to support large applications and large teams. Importantly, TypeScript enables great tooling experiences for JavaScript development, like those we’ve built for .NET and C++ and continue to innovate on with projects like “Roslyn”.  This is true whether you’re writing client-side JavaScript to run on Windows, Internet Explorer, and other browsers and operating systems, or whether you’re writing server-side JavaScript to run on Windows Azure and other servers and clouds.

TypeScript adds static typing to the mix. That means the compiler will flag an issue up front if the developer assigns an incorrect data type to a variable instead of waiting till the program runs, as dynamically typed languages — including JavaScript — do. That delay can lead to problems when the program does run.

An early preview of TypeScript is now downloadable from this site

For more on TypeScript check out the video by Microsoft Fellow (and programming language superstar) Anders Hejlberg.

  1. boo to static typing

    Share
    1. It’s optional, so you don’t have to use it when it gets in the way.

      In other cases though, having defined types, especially across different areas of a code base, really helps avoid debugging headaches. The “make change, run to see if it works, see it doesn’t, make more corrections, repeat” loop can only scale so far before you realize the code is just unmaintainable. With static types the compiler can at least help identify all your problem areas so you don’t have to check yourself at runtime.

      Share
      1. Agreed, static typing has that advantage. Remember those complains about the code completion features for dynamic typed languages are weak?

        Now things will be changed. I’m developing a text editor for lively editing and testing html/css/js, the next major will be the implementation of code completion (intelleSense), with plain JS I doubt I can go any further than the others, but with TypeScript, things will be better, I guess.

        PS, link of my live code editor mentioned above: http://liveditor.com

        Share
  2. Nice try MS. I still rather work in good old C# and compile it to JS with http://sharpkit.net/

    Share
    1. Why would you want to use Sharpkit when it’s expensive ($199), and not open source?

      Sharpkit is not obsolete.

      Do you work for them or something?

      Share
  3. Nice try MS. I still rather use good old C# and compile it JS using http://sharpkit.net/

    Share
  4. Why not use Actionscript 3. It’s just needs to divorce the Flash Player, and honestly, it dosen’t need it.

    Share
    1. If you look at the TypeScript language, I think you’ll see that it is very close to ActionScript 3. It uses ActionScript 3 type syntax to declare the types for variables, classes and even inheritance. However in some ways TypeScript is ahead of ActionScript 3. For example TypeScript sports better type checking when assigning functions to variables, and it supports method overloading. At any rate based on what I’ve seen from TypeScript, if you’re an ActionScript 3 developer you’ll probably feel right at home with TypeScript.

      Share
  5. Is microsoft trying to make another .Net with Typescript? That’s just what we need, companies buying bloated Microsoft tools to do JavaScript development https://plus.google.com/u/0/115228087852945642621/posts/XACvqPYHFRw

    Share
  6. John Smithenson Wednesday, October 3, 2012

    Boo to static types? Obviously most script kiddies have never worked on really large applications.
    Any help you can have to find possible problems are such a bonus…

    Share

Comments have been disabled for this post