News for hackers. Stuff that matters.
Re:TypeScript 0.9 released by klibertp on Tuesday June 18, 2013 @06:25PM (#5902456)
It's completely unrelated to CoffeeScript, as CS does practically no static analysis and generally CS does almost nothing more than pure JS. What it does is it translates some keywords to a chunks of JavaScript code. If JS had macros - sweet.js! - Coffee would be completely unneeded.

TypeScript is entirely different thing. It adds a layer of static analysis to the language, which does not end in the code that actually runs. Generally everything you type in Coffee has an equivalent in compiled JS; it is not so with TypeScript, where you can write pages of code which won't be visible in the compiled JS.

CS and TS have different goals and are different things, and the only thing they have in common is that they both "transpile"/compile some language to another. Hardly a similarity that makes them very close.

Actually I would appreciate TypeScript implementation on top of Coffee (or the other way around, whichever would be simpler). There is a dialect of CS that supports contracts (you really, really should start using contracts anyway), but that's yet another thing that cannot hope to replace static verification of certain things in programs.

Re:TypeScript 0.9 released by ixtraz on Wednesday June 19, 2013 @02:11AM (#5903974)
You're absolutely right. I'm an C# dev who switched to JavaScript stack and using TypeScript already for 5-6 months. It was just a first-look description for the TypeScript.

Btw, TypeScript also aiming to fix context problem so in callbacks 'this' keyword is always related to parent class.

Re:TypeScript 0.9 released by klibertp on Wednesday June 19, 2013 @04:20AM (#5904357)
`this` being dynamically bound is a feature, it's broken as intended. You can always `bind` a function to remedy this if it's a problem for you.
Re:TypeScript 0.9 released by lucian1900 on Wednesday June 19, 2013 @05:10AM (#5904531)
Why would it be a feature? It is almost never the desired outcome, thus a terrible default.