Channels ▼
RSS

JVM Languages

Microsoft's TypeScript New Programming Language


Microsoft released a new open source, standards-based, general-purpose programming language that extends the capabilities of JavaScript. TypeScript has been unveiled by Soma Somasegar, corporate vice president of the developer division at Microsoft, and described as a means of writing cross-platform JavaScript to run in any browser on any device running standard JavaScript.

As an "application scale" offering, Microsoft says that the release of TypeScript comes in direct response to the challenge of creating larger-scale JavaScript applications.

NOTE: In search of a definition for what constitutes a "large-scale" JavaScript application, developer programs engineer at Google Addy Osmani writes, "In my view, large-scale JavaScript apps are non-trivial applications requiring significant developer effort to maintain, where most heavy lifting of data manipulation and display falls to the browser."

In terms of form and function, TypeScript uses the same JavaScript syntax and semantics. It compiles to clean, standard, broadly compatible JavaScript. TypeScript starts and ends as JavaScript, adding only what is needed for large-scale web client applications to the JavaScript standard, so developers will be able to reuse existing JavaScript.

Microsoft is also releasing a TypeScript for Visual Studio 2012 plugin that the firm hopes will improve developers' experiences with the tooling and further help address the challenge of building large-scale JavaScript applications. The TypeScript plugin provides developers with code navigation, refactoring, static error messages, and IntelliSense.

Somasegar says that JavaScript was originally designed to be a client-side scripting language for web pages: "For many years it was limited to event handlers that scripted a Document Object Model (DOM). As a result, JavaScript is missing many of the features necessary to be able to productively write and maintain large-scale applications, namely those that create distinct contracts between components and developers."

"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," said Somasegar.

As stated, TypeScript is open source and the compiler is available under the Apache 2.0 license on CodePlex, Microsoft's free open source project-hosting site.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video