This is a slight break from the usual random short stories and bad poetry, but I thought I'd add my view on the new TypeScript programming language from Microsoft. My work-time life is spent developing websites and database systems and I had the pleasure and privilege to meet Mr. Shanku Niyogi, Director of Test from the Visual Studio team at Microsoft yesterday. Shanku was the guest speaker at a VBug organised Visual Studio 2012 Launch Event at Microsoft, Reading, UK and spoke on several topics in and around Microsoft's new IDE. One of the topics that came up, and one which Shanku spent some time on, was the subject of TypeScript.
What is TypeScript?
Exactly the same? Well, yes, essentially if you take any .js file and paste the contents into .ts file, it will work as TypeScript.
How does this work?
This means several things:
But why bother?
OK, well Shanku explained this really well, so I'll just steal his example (I hope you don't mind, sir!).
The Microsoft team saw a problem.
- The latest web browsers have refined the way script is managed to such a degree that websites can now use a large amount of script without much of a penalty. Check!
Q2: If you do the same in C#, what do you get?
- Saying that, you get proper intellisense!
- You can right-click on any property, function, class name or variable in a TypeScript file and select Refactor -> Rename from the Visual Studio IDE to rename that element
- You get proper support for testing
There are probably many more benefits that I can't think of at the moment.
What TypeScript is not...
I hope that the above is clear enough to alleviate any concerns about TypeScript. However, I thought I'd put a few points down here to clear up any worries. Some of these points were raised at the demo last night:
If any of the above is incorrect, please feel free to comment or contact me directly on Twitter (@LordScree). I'll aim to make any corrections necessary within a reasonable time.