Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeScript VS ScriptSharp – What’s the tradeoff’s?

I am about to build a large scale Javascript application and I want to build it in more structured way.
Jquery is will use for css effects.
The server side will be in c#.
Can you share your knowledge and experience, which is better?

  1. Which one is more feature rich?
  2. Which is better documented?
  3. Is type script really strongly type?

Also, for the long run, ScriptSharp is one-man-show (As I understand it) and Typescript was built by Microsoft.
Thanks

like image 859
SexyMF Avatar asked Feb 07 '13 13:02

SexyMF


1 Answers

Which one is more feature rich?

Neither - the compiled JavaScript makes all of JavaScript available to you.

Which is better documented?

Documentation is probably not the right question. Which has more information available / a strong community to help you when you get stuck? As of now, there are 141 ScriptSharp questions (with 48 followers) on Stack Overflow and 623 TypeScript questions (with 328 followers).

TypeScript has a very clear language specification. I had a look for the documentation on ScriptSharp - someone will need to point out where this is... I assume there is a sub-set of C# you can use and I would be interested in knowing what that sub-set is.

Is TypeScript really strongly typed?

TypeScript is statically typed. It will check types at compile-time (and IDEs will check at design-time). Errors will be generated for type violations, although you can also opt to have dynamic typing also if you want to.

Which one should I use?

If you can't bear the thought of writing code in anything other than C#, you should use ScriptSharp. In all other cases, I recommend TypeScript. Understanding JavaScript is beneficial given how the language is so ubiquitous and TypeScript gives you early access to ECMAScript 6 language features, so if you decided to ditch everything and use pure JavaScript, your TypeScript coding experience will be more valuable.

I am biased, in a way. I like TypeScript so much I wrote a book on it. However, the enthusiasm for TypeScript (rather than Dart, CoffeeScript, ScriptSharp) preceded that project.

like image 51
Fenton Avatar answered Sep 21 '22 01:09

Fenton