TypeScript

Soldato
Joined
18 Oct 2002
Posts
3,926
Location
SW London
So, who has looked at Microsoft's latest thing?
http://www.typescriptlang.org/

There is an introductory video here: http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript
and more stuff about it here: http://typescript.codeplex.com/

It certainly looks interesting, but I do feel a little sceptical about it all.
Looks to be something along the lines of CoffeeScript or Dart in that it's an attempt to create something that is better than JavaScript, but compiles down to the same thing.
The interesting thing about it is that it's a proper superset of JavaScript, so all existing JavaScript code is already TypeScript code.

The things that make me nervous are, well, it's Microsoft so who knows what they will do with it! They mention about submitting it as an open standard, but whether than will actually ever happen is a completely different thing!

Secondly, I'm not sure what this means for the future of C#. That is the language with which I make my living at the moment, so it's fairly relevant for me.
Looking at the things they've introduced it seems clear to me that this is an attempt to get C# developers writing JavaScript (well TypeScript) and it makes me think that C# doesn't have a long term future, which makes me a little sad as I really like it as a language.

To me it looks like the sort of thing that JavaScript always should have been though. That's me coming at things from a static typed, object oriented background, so I'm interested to hear what the hardcore JS guys think of it.
 
The things that make me nervous are, well, it's Microsoft so who knows what they will do with it!
Given previous history they'll bleat on for a couple of years about how it's the next greatest thing to happen, then someone will either discover it doesn't scale very well (LINQ/EF) or no one will use it (Silverlight) or it'll be awesome, but MS will decide it's not the way they want to go (XNA) and it'll quietly disappear, never to be seen again.

TBQH I don't see the point of this. jQuery already removes the main barrier to learning javascript - catering for different browsers. This just seems like yet another attempt to make a typed language for the sake of it. I guess with Metro being JS based they're trying to get as many people on board as possible.
 
I don't think the main focus is the browser...

Code:
[sldsmkd@localhost hello-world]$ npm search typescript
npm http GET https://registry.npmjs.org/-/all/since?stale=update_after&startkey=1349340535000
npm http 200 https://registry.npmjs.org/-/all/since?stale=update_after&startkey=1349340535000
NAME              DESCRIPTION                                                   AUTHOR       DATE              KEYWORDS
grunt-typescript  compile typescript to javascript                              =k-maru      2012-10-03 04:07  gruntplugin
scriptbroadcast   Broadcast recorded typescripts(shell sessions)                =clvv        2011-04-24 21:28
typescript        TypeScript is a language for application scale JavaScript development =typescript 2012-10-01 15:35  TypeScript Microsoft compiler language javascript
 
Given previous history they'll bleat on for a couple of years about how it's the next greatest thing to happen, then someone will either discover it doesn't scale very well (LINQ/EF) or no one will use it (Silverlight) or it'll be awesome, but MS will decide it's not the way they want to go (XNA) and it'll quietly disappear, never to be seen again.

TBQH I don't see the point of this. jQuery already removes the main barrier to learning javascript - catering for different browsers. This just seems like yet another attempt to make a typed language for the sake of it. I guess with Metro being JS based they're trying to get as many people on board as possible.

It has nothing to do with jQuery though. TypeScript is about improving the crappy JavaScript language to make it vaguely usable in large development projects. Type safety and type inference are the key features it brings to the table. Object orientation, namespacing and short-hand lambdas are just nice to haves but also welcome additions.

The sooner we abstract away from JavaScript the sooner it becomes a mere IL / VM layer in the stack. It deserves to be nothing more than the equivalent of x86 or MSIL or JVM Bytecode.

DoppioVM is just another example of the direction things are heading. JavaScript will soon become irrelevant.
 
I've spent some time looking at it. It's good.

It's properly Open Source, this is important to me.
It's a pure superset of JS, any legacy code works as a drop in.
The tooling is good enough, the best IDE for it is Visual Studio 2012 but it's workable in Vim and Sublime. I'm sure it's okay in Emacs too.
They appear to be tracking ES6 closely, it's a bridge until that arrives.
My developers have working knowledge of JS but are MUCH more comfortable with Class based OO than Prototypes.
It worked with minimal fuss on a CentOs / Nginx / Node stack.

Haven't dug into code coverage and TDD options yet, but I suspect they will come in short order if not already present.

As a side note the code it spits out is sensible and readable JS. It's supporting a better development environment, it's mainly syntactical sugar to make the lives of Developers and IDE's better.

It's very pragmatic. Dart is reinventing JS and relying on mainstream support that I can't see it getting. Coffee is more similar but it's a new syntax.
 
Secondly, I'm not sure what this means for the future of C#. That is the language with which I make my living at the moment, so it's fairly relevant for me.

I haven't read about typescript in depth but it looks a good idea to me. I'd be more worried about ASP.NET than C# - always found it pretty clunky and typescript could make UI much nicer.

C# wont really go anywhere I don't think, least not in the short/mid term. I think its generally accepted as a decent back end/enterprise language now.
 
Back
Top Bottom