Live data from Hacker News

Why does TypeScript have be the answer to anything?

hanselman.com

81–82 of 82 posts

Re: Why does TypeScript have be the answer to anything?

#81

The author ignores the fact that TypeScript is being heavily promoted by Microsoft. TypeScript isn't an experiment, but something Microsoft is trying to sell, along with their IDE. He starts it with a quote from a colleague rather than citing examples of people attacking TypeScript, as if it's a forgone conclusion that people have gone overboard on attacking it. I hate to see an argument for a programming language st…

> Microsoft is trying to sell, along with their IDE

I highly doubt that they created TypeScript to try to sell more copies of Visual Studio. I mean TypeScript is under the Apache 2.0 License so I don't see what would stop other IDEs (like JetBrain's WebStorm/PHPStorm/RubyMine/etc...) from integrating TypeScript into them (and I really hope they do soon).

Re: Why does TypeScript have be the answer to anything?

#82
post #73
post #72

Earlier quoted context omitted.

> What's the difference? One lets you take existing JS-code and make use of new language features there. The other "just" lets you call existing JS-code. I'd guess one is clearly better than the other when it comes to dealing with existing JS-code* . (While the other is clearly preferable to the one when it comes to making the language you want to make.) * It still obviously depends a lot on the language. Like, how w…

OK. So there is a path to converting JS to typescript without rewriting the whole thing. Thanks for the additional information.

I believe it is also possible to create definition files, like c++ header files, for existing libraries. So for instance, if you want the type checking for backbone, you could create a backbone.d.ts and just include the class/method/function definitions (and interfaces if you want to) and not even touch the original library. I would imagine this is the preferred way of doing things still I would imagine most libraries are not going to want to convert there libraries to include TypeScript only syntax.
Post reply on HN