TypeScript presentation (take 2) at SPSMEL
Earlier today I delivered possibly my best TypeScript session ever at SharePoint Saturday Melbourne. The attendees were great, and I feel like I cracked jokes all the way through!
The secret, and this I think many attendees may not have realized, is that I started almost 10 minutes early. So they went through 70 minutes of solid TypeScript wonderland with me. I hope that extra time was good.
As I have actually done the rounds with TypeScript for a whole year. I think this might be a good time to sunset this particular topic.
Download Links
The Future of TypeScript
TypeScript, now that it has reached version 1, will never disappear:
There are some really big projects within Microsoft that is using TypeScript. There is no alternative for them to switch to.
- Dart - is not focused on building JavaScript. Dart believes that JavaScript is broken fundamentally, and the only way to fix it is to introduce a new Virtual Machine. Dart compiles down to JavaScript is almost a side-effect for adoption. If Flash and Silverlight are bad for the web, what do you think people's reaction would be to Dart VM?
- Coffee Script is great, and solves a genuine problem with JavaScript - that the language is too loose, and gives you too many ways to hang yourself. Coffee Script's syntax, being so close to Ruby, will ensure a smooth path for them to work on Ruby and Coffee Script.
In the same vain that I feel a Ruby Developer should never use TypeScript - they should use CoffeeScript; a C#/.NET/Java/C++/JS developer should never use Coffee Script - they should learn the TypeScript syntax that's closer to what they already know, plus TypeScript will greatly help them learn, understand and write better Javascript. - ECMA Script v6 - is really the holy grail that will fix a lot of the odd JavaScript syntax (along with "option strict"). But ES6 does not include Type information. What that means is that even with the eventual convergence of the Evergreen Browsers to ES6, TypeScript will still have a place as a superset to ES6. The Type information is important for the tools to correctly check your code for you during design and compile time.
TypeScript sits in its own place. It tries to give you "invisible railings" for your JavaScript.
With TypeScript, you start with JavaScript, and you work within self imposed railings (which magically disappear when it's compiled back in JavaScript) so you get the benefit of a strong typed language to help you write code, but none of the performance penalties.
TypeScript enables teams to work together. For projects that have hundreds of thousands of lines of JavaScript - there is no way back.
Remember: As your JavaScript codebase grow, it will become unmanageable and you will have code rot. TypeScript is a great way to help you avoid that gruesome spaghetti situation.