Linked by Thom Holwerda on Mon 1st Oct 2012 22:55 UTC
General Development "Everyone seems to have a replacement for JavaScript - Google even has two. Now Microsoft has revealed that Anders Hejlsberg has been working on a replacement and it has released a preview of TypeScript. TypeScript is open source - Apache 2.0 license - and a superset of JavaScript. As you would expect from a Hejlsberg language it incorporates type checking, interfaces and lots of syntactic sugar."
Thread beginning with comment 537216
To read all comments associated with this story, please click here.
Another optionally typed language
by kragil on Tue 2nd Oct 2012 00:23 UTC
kragil
Member since:
2006-01-04

TypeScript and Dart try to solve the same problems...

... something smells like NIH here.

PS. I know they market it as statically typed, but it is in reality optionally typed, just like Dart. At least Google is admitting that, whereas MS is all about marketing ... again.

Reply Score: 1

Nelson Member since:
2005-11-29

TypeScript and Dart try to solve the same problems...

... something smells like NIH here.

PS. I know they market it as statically typed, but it is in reality optionally typed, just like Dart. At least Google is admitting that, whereas MS is all about marketing ... again.


They solve the same problem in different ways. Typescript is closer to ECMAScript6 and a superset of JavaScript.

Also: The correct term is statically weak typed language. There are holes in the type system, but there are compile time guarantees if you stay within the sandbox.

So technically, yes, sorry, the creator of C# knows his terminology.

Reply Parent Score: 3

kragil Member since:
2006-01-04


So technically, yes, sorry, the creator of C# knows his terminology.


FAIL

That is why _his_ slides and the website now say:

Optional Static Types

Reply Parent Score: 3

Hiev Member since:
2005-09-27

No, MS admits that JavaScript for server site is not an easy task to maintain, Dart is a different languaje from javascript, TypeScript is a superset of javascript (just like c++ is a superset of c), with means, that Javascript is 100% compatible with TypeScript, and adds static typing and many features javascript doesn't have. Besides TypeScripts compiles everything to JavaScript, just like CoffeScript does.

I like the solution, because it comes with the Apache license and is a very well thought.

I'd like for once that these haters read the documentation and statements before making such ignorant comments.

Reply Parent Score: 3

some1 Member since:
2010-10-05

TypeScript is a superset of javascript (just like c++ is a superset of c), with means, that Javascript is 100% compatible with TypeScript

Except C++ is not a strict superset of C, which means that C is not 100% compatible with C++. I.e. there are C programs which either are not C++ programs, or have a different meaning in C++.
I hope TypeScript does a better job at being a superset. But then, if you're 100% compatible with JS you get all the crazy stuff like this: https://www.destroyallsoftware.com/talks/wat

Reply Parent Score: 3

bassbeast Member since:
2007-11-11

<p>Does anybody know how this looks as far as security? And please no "Its from M$ so its worthless" as I really want to know. the biggest complaint I've had about JavaScript is that frankly its a security nightmare, you block JavaScript and malware drops right off the map.</p>

So I honestly don't care if it comes from MSFT, Google, or Toys R Us, if it helps to get rid of the security nightmare that is modern JavaScript I'm ALL for it.

Reply Parent Score: 2

Bill Shooter of Bul Member since:
2006-07-14

Besides TypeScripts compiles everything to JavaScript, just like CoffeScript does.


What are the benefits/drawbacks of TypeScript over CoffeeScript then? I agree TypeScript and CoffeeScript are much closer to each other than either are to Dart.

Reply Parent Score: 2

MollyC Member since:
2006-07-04

TypeScript and Dart try to solve the same problems...

... something smells like NIH here.

PS. I know they market it as statically typed, but it is in reality optionally typed, just like Dart. At least Google is admitting that, whereas MS is all about marketing ... again.


Takes a whole LOT of arrogance (and/or ignorance) to accuse Anders Hejlsberg of being an empty suit.

Reply Parent Score: 4

Bill Shooter of Bul Member since:
2006-07-14

Yeah, he's more of a hired gun than an empty suit. I really do admire him and his skills. The issues I have with .Net are not his fault, but the things I admire about C#/.Net are his doing.

Reply Parent Score: 3