Live data from Hacker News

Announcing TypeScript 1.0

blogs.msdn.com

41–50 of 118 posts

Re: Announcing TypeScript 1.0

#41
post #36
post #28

Could someone be so kind as to explain why I should consider Typescript over Coffeescript in future projects? I've been using CS for the past year or two, but I'm hearing a lot of buzz around TS for the past few months. It would be really nice to have a better idea as to why it should be best to move now - is it really that much better? (I love the CS tools available on PyCharm; they really made my life easier. That…

One reason (as I see it) is that TypeScript is implementing ES6 features along with the type-specifc stuff, so it's going to end up in a place where it's very compatible with the 'future' of JavaScript. CoffeeScript will always be something quite different. I love it, but that difference makes me nervous. ES6 ought to bring a lot of the features I like about CoffeeScript into JavaScript.

I don't want to troll here but "very compatible" sounds like MS best days of EEE - Typescript still IS a different lang. Question is what if future Javascript will go in a different direction than todays Typescript ?

Typescript main feature is tooling but I would rather go with lang where I'm not second class citizen on non-windows (eg. Dart's editor works on Windows/OSX/Linux)

Re: Announcing TypeScript 1.0

#42

The language is nice, but the compiler uses its own lib.d.ts which has all sorts of definitions for browsers and even proprietary MSIE ones. This doesn't make any sense when using TypeScript in any other context (like Gjs, NodeJS, Rhino, Seed, etc.). TypeScript shouldn't assume a browser by default, or at least provide an option for compiling without lib.d.ts.

$ tsc --nolib

Re: Announcing TypeScript 1.0

#44
Anders is a really good language designer. Everything this dude touches turns to gold. He was also behind C# and as far as enterprise languages go C# is a joy to work with. TypeScript is the same way. It's all really well thought out and instead of getting in the way the type system actually helps because you can leverage the dynamic aspects of JavaScript during the prototyping phase and then gradually add types as the design is fleshed out. Typed Racket I think is the other language that gives you similar capabilities but I haven't played enough with that one to have an opinion yet.

Re: Announcing TypeScript 1.0

#45
post #36

Earlier quoted context omitted.

One reason (as I see it) is that TypeScript is implementing ES6 features along with the type-specifc stuff, so it's going to end up in a place where it's very compatible with the 'future' of JavaScript. CoffeeScript will always be something quite different. I love it, but that difference makes me nervous. ES6 ought to bring a lot of the features I like about CoffeeScript into JavaScript.

I don't want to troll here but "very compatible" sounds like MS best days of EEE - Typescript still IS a different lang. Question is what if future Javascript will go in a different direction than todays Typescript ? Typescript main feature is tooling but I would rather go with lang where I'm not second class citizen on non-windows (eg. Dart's editor works on Windows/OSX/Linux)

Do you really feel JavaScript has that luxury? Seeing as how widely deployed and used it is I feel that it can't go in a completely different direction anytime soon.

Re: Announcing TypeScript 1.0

#46

The typescript playground[1], which lets you try TypeScript in your browser, looks so professional and finished when compared to CoffeeScript[2] or Dart[3]. As someone who attempted a half-baked Rust to JavaScript transpiler[4], I am floored with the packaging of TypeScript (tutorials, specs, editor integrations, npm, playground). At the moment, the only missing feature that my jealousy could point out is autoscrolli…

I don't think any of them are very polished or professional.

The CoffeeScript site reports errors unintuitively yet visibly in the top-right corner. The TypeScript site requires that you scroll right to the error and then realize it's not just your browser complaining about a misspelling. But both are better than the Dart sandbox, which basically only says "error".

None of them get page layout right. Dart and TypeScript have obvious input/output boxes, but both get demerits for their handling of overflow. Dart just grows the box which is acceptable, but TypeScript thinks their customized scroll bars are better than native. CoffeeScript handles overflow reasonably, but it's a big translucent overlay causing all sorts of moire on my screen.

I suppose if you're on a Windows computer you might be tricked into thinking the TypeScript page looks reasonable, since it probably fits in. For me, though, I'm having a hell of a time figuring out what's a button and what's not.

Re: Announcing TypeScript 1.0

#47

Anders is a really good language designer. Everything this dude touches turns to gold. He was also behind C# and as far as enterprise languages go C# is a joy to work with. TypeScript is the same way. It's all really well thought out and instead of getting in the way the type system actually helps because you can leverage the dynamic aspects of JavaScript during the prototyping phase and then gradually add types as t…

Linq (cough)

Delphy (cough, cough)

Re: Announcing TypeScript 1.0

#48

Earlier quoted context omitted.

I don't want to troll here but "very compatible" sounds like MS best days of EEE - Typescript still IS a different lang. Question is what if future Javascript will go in a different direction than todays Typescript ? Typescript main feature is tooling but I would rather go with lang where I'm not second class citizen on non-windows (eg. Dart's editor works on Windows/OSX/Linux)

Do you really feel JavaScript has that luxury? Seeing as how widely deployed and used it is I feel that it can't go in a completely different direction anytime soon.

Not JavaScript, but Typescript. What if Typescript will implement now features incompatibile with future JS ?

Re: Announcing TypeScript 1.0

#49
post #18

Anders is my favourite language designer, ever :) TypeScript is something I'm still trying to get more buy-in from my team, but the issue is the lack of decent autocomplete/static analysis in anything other than Visual Studio. I'm working on that problem myself, actually.

IntelliJ supports TypeScript! http://www.jetbrains.com/idea/webhelp/typescript-support.htm...

From past experience, their support is good, but one significant thing I missed was type inference:

    // function signature
    getNumber(context: any, callback: (result: Number) => void);
    
    // calling that function
    // unfortunately, here the type of num is any
    // unless I specify it manually
    getNumber(..., (num) => { ... });
Visual Studio figured out the type on its own.

Re: Announcing TypeScript 1.0

#50
post #36
post #28

Could someone be so kind as to explain why I should consider Typescript over Coffeescript in future projects? I've been using CS for the past year or two, but I'm hearing a lot of buzz around TS for the past few months. It would be really nice to have a better idea as to why it should be best to move now - is it really that much better? (I love the CS tools available on PyCharm; they really made my life easier. That…

One reason (as I see it) is that TypeScript is implementing ES6 features along with the type-specifc stuff, so it's going to end up in a place where it's very compatible with the 'future' of JavaScript. CoffeeScript will always be something quite different. I love it, but that difference makes me nervous. ES6 ought to bring a lot of the features I like about CoffeeScript into JavaScript.

It is notable that TypeScript chose not to track the ES6 modules standard for the last half a year: https://typescript.codeplex.com/discussions/446695 The modules you are writing in TypeScript are not compatible with ES6.

The TypeScript language team has yet to prove that they will track the specs and implement features as spec'd. I think claiming that they will "implement ES6 features" is a bit pre-mature. So far, they have implemented a few drafts and ignored a few others. A mixed bag.

Post reply on HN