Welcome to WebmasterWorld Guest from 54.159.165.175

Forum Moderators: bill

Microsoft takes the wraps off TypeScript, a superset of JavaScript

   
5:31 am on Oct 2, 2012 (gmt 0)

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month Best Post Of The Month



Microsoft takes the wraps off TypeScript, a superset of JavaScript [zdnet.com]

On October 1, Microsoft took the wraps off TypeScript, a new programming language that is aimed at making JavaScript development scale beyond the client.

...

"With HTML5, the standards web platform has become significantly more compelling for delivering rich user experiences. At the same time, the reach of JavaScript has continued to expand, going beyond the browser to include native device apps (e.g. Windows Store apps for Windows 8), applications in the cloud (e.g., node.js running on Windows Azure), and more. With these developments, we’re starting to see applications of unprecedented size written with JavaScript, despite the fact that creating large-scale JavaScript applications is hard. TypeScript makes it easier."
5:42 am on Oct 2, 2012 (gmt 0)

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



This will cause some controversy I'm sure.

Not being a strictly client-side developer, I still wonder what this "going beyond the browser " means. It sounds like it's an adoption that would better be avoided.
2:38 am on Oct 3, 2012 (gmt 0)

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month Best Post Of The Month



Agreed. I read that and my brain screamed "security hole!".
10:29 am on Oct 3, 2012 (gmt 0)

WebmasterWorld Senior Member leosghost is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



From the people who brought you activeX ..;) what could possibly go wrong ? ..
12:19 pm on Oct 3, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



TypeScript is a development tool to aid developers in type checking their JavaScript code, and to provide Intellisense for code completion. The idea is that more coding errors will be caught at design-time, not at run-time.

TypeScript operates along the same lines as JSLint. So I guess if you think those types of developer productivity tools are evil, you should stay away from them.

When TypeScript is compiled, it translates into plain old JavaScript. Your browser simply sees JavaScript, and cannot tell if TypeScript was used to create it at design-time. So the only security hole would be in your browser, if it has a buggy JavaScript interpreter/compiler.
1:57 pm on Oct 3, 2012 (gmt 0)

5+ Year Member



The idea is that more coding errors will be caught at design-time, not at run-time.

I agree. Doesn't look to be improving anything for visitors (ie, improving runtime) but rather helping developers write javascript. I know there are a few other tools out there like this, but having the option of being tied into Visual Studio, and including things like the type checking, could make it a winner.

I think the kicker will be how good the javascript is that is generates.
2:19 pm on Oct 3, 2012 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Yeah, TypeScript [typescriptlang.org] basically sounds like a CoffeeScript [coffeescript.org] alternative.
2:41 pm on Oct 3, 2012 (gmt 0)

5+ Year Member



Apparently the main difference between TypeScript and CoffeeScript is that CoffeeScript is a new language that compiles to javascript, where typescript is (to a certain degree) javascript, but with additions, which then compile to normal javascript.

I think what MS were trying to say is that you can write bog-standard javascript in a typescript file and it will work just fine. If you want to use any of the new stuff (classes, etc), then you can do, and it will result in javascript that does that job.

I think that's subtly different to CoffeeScript, but having used neither of them, I can only guess what's better!
7:30 pm on Oct 9, 2012 (gmt 0)

10+ Year Member



Google does something similar with GWT. GWT compiles Java code into JavaScript.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month