We have been discussing this internally for some time, so we are definitely not just dismissing this potentially significant development in the JS world. The fact that the definition files can be separated from the core of the framework is also a big plus, obviously.
No decisions yet, but stay tuned.
Don, just curious if you could provide any update on the internal discussion on this? As I said earlier, this seems like absurdly low-hanging fruit. It's just generating a single definition file.
TypeScript starts from the syntax and semantics that millions of JavaScript developers know today.
With TypeScript, you can use existing JavaScript code, incorporate popular JavaScript libraries, and be called from other JavaScript code.
TypeScript compiles to clean, simple JavaScript code which runs on any browser, in Node.js, or in any other ES3-compatible environment.
class Point { x: number; y: number; constructor(x: number, y: number) { this.x = x; this.y = y; } getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); } } var p = new Point(3,4); var dist = p.getDst(); alert("Hypotenuse is: " + dist);
Or you can write correct and productive JavaScript without the need of any compiler like coffeescript or typescript.
True, true! Unfortunately, you'd be surprised by how many developers aren't actually disciplined enough to write correct and productive JavaScript. That's where the transpilers come into play. To keep the senior engineers sane...in my experience anyway. ;-)
For something like Ext, I don't think it makes tons of sense. Ext provides a class system and takes care of most cross browser issues. It provides a ton of functionality that Js doesn't do on its own. As far as code analysis is concerned, Sencha recently released an eclipse plugin that brings plenty of code intelligence to the table. I think TypeScript would add a layer of complexity to Ext without bringing any benefit that it doesn't already have. TypeScript looks cool and I think it would be great to use if you are working with Js on its own, but not with something like Ext.
I am really happy that ccg brought this up, however, I 100% agree with you, Tim.
I recently blogged about TypeScript and I am definitely in agreement with Microsoft's rationale behind the initiative. This was before I landed a gig as an iOS, Android and Sench Touch mobile application architect as of two weeks ago. I'm already cooking up a blog post about my thoughts on Sencha Touch and the Sencha Class System and I've got a handful of other blog post ideas itching to be typed out, lol.
With that said, I can absolutely foresee some additional syntactic sugar added on top of the Sencha Class System once TC39 is finally released and ES6 becomes a reality. I can't *wait* for that day to arrive! :-)
Also, I can't write "correct javascript" when I'm using Ext because whenever I use this.callParent() it throws an error: "Uncaught TypeError: Illegal access to a strict mode caller function.ext-all.js:21".
NOTE: I'm very new to Ext JS 4/Sencha Touch so this is pure conjecture on my part.
I'm not sure if anyone has already mentioned this but I believe the reason for your error is that you're declaring 'use strict' and Sencha doesn't currently support this mode to maintain backwards compatibility for older browsers. Unless that was the point you were trying to make. :-)
We have been discussing this internally for some time, so we are definitely not just dismissing this potentially significant development in the JS world. The fact that the definition files can be separated from the core of the framework is also a big plus, obviously.
No decisions yet, but stay tuned.
Don, you posted this seven months ago, so just curious if there has been any movement in this area?