7 ms·
Another +1 for TypeScript. Does anyone else see TypeScript as being a big player in the coming years?
by Firegarden 12y ago
Another +1 for TypeScript. Does anyone else see TypeScript as being a big player in the coming years?
- joshstrange 12y agoI've largely ignored it so far. I'm not a huge fan of writing in something like Coffeescript/TypeScript/etc because when the underlying JS changes (Like ES5->ES6) it can cause big breakage and/or confusion (Will CS classes work like classes do in ES6?). I am a fan of Babel (formally 6to5) because writing JS in the new standard format and transpiling to ES5 seems a lot cleaner and it's all still just JS. Also ES6 is a MUCH easier sell to other developers (who might not use JS as much but still need to interact with it) than moving to CS/TS IMHO.
- findjashua 12y agoThe breakage argument is valid for Coffeescript, but Typescript has always made it clear that it supports ES6. Am I missing something?
- joshstrange 12y agoI apologise, I have read very little on TS due to me lumping it in with CS. If this is not the case then I would like to retract my statements on TS. It appears I need to read up more on TS. I was also put off by it due to when it was released there was very little IDE support and IMHO it was a little murky on how to use it (Also MS released it AFAIK and I'm a little skeptical of anything involving MS + Web, IE scars don't heal fast). I need to look into the tooling available for it now.
- hammerandtongs 12y agoWorks great in emacs.
- aikah 12y agoTS doesn't support ES6 today. It doesn't support generators, it doesn't support ES6 modules , quasis ... For that you need to wait For Microsoft to implement those features.
- findjashua 12y agothe website says it supports modules. Quasi literals also seem to be supported.
- aikah 12y agoThat's untrue read the spec. Typescript doesn't support ES6 modules , nor quasi literals. Typescript has its own module system which is incompatible with ES6 modules.
- findjashua 12y agoFair enough. I haven't read the spec, just went to their website, and one of the first things they mention is modules and classes. Also, when I googled 'typescript template string' the first hit was https://github.com/Microsoft/TypeScript/issues/13 https://github.com/Microsoft/TypeScript/issues/13, so I assumed they were supported.
- tlrobinson 12y ago"when the underlying JS changes (Like ES5->ES6) it can cause big breakage" [Citation Needed] As I understand it ES6 is meant to be backwards compatible with ES5. CS classes won't make use of the new "class" syntax, but they should be compatible ES6 classes (they can subclass each other) because they're both really just sugar on top of JavaScript's prototypal inheritance.
- BrendanEich 12y agoThe problem is ES6 is not forward-compatible from the point of view of CS or TS. That's ok if the latter two (and other such languages) can change to track ES6, as MS promises TS will. Just one example from CS: the difference between for/of meanings.
- tlrobinson 12y agoThat seems like a bigger issue for TS, which aims to be a superset of JavaScript, vs. CoffeeScript which is a totally different language. And I think the parent comment was concerned CS/TS would break as ES changes underneath.
- BrendanEich 12y agoPretty sure the parent was talking about what I elaborated on -- see in particular "... because when the underlying JS changes (Like ES5->ES6) it can cause big breakage and/or confusion (Will CS classes work like classes do in ES6?)" Having two kinds of for-of loops and two kinds of classes, even if CS tries to present only its flavor and hide the underlying (but you can still escape out to raw JS from CS), does make for confusion. Also, separate point, ES6 sucks oxygen from CS, so while I expect CS to live on, it won't see as much adoption as it would have absent ES6. The reason to consider this is that if it's a big enough oxygen-sucking effect, CS might want to break its own backward compatibility in order to re-align with JS. I've heard talk of such a change, but I haven't talked about it Jeremy or Michael. Pointers welcome.
- 12y ago
- nawitus 12y agoYou can use TypeScript with the ES6 output mode and then transpile that to ES5. In fact, that's what I do.
- bsimpson 12y agoIsn't TypeScript the same type system that Microsoft scuttled along with the rest of ES4?
- BrendanEich 12y agoNo, TS came in October 2012, after ES4 was laid to rest by Harmony (July 2008). Its type system differs notably (e.g., bivariant generics, structural-only subtyping). There's an interview with Lars Bak and Anders Hejlsberg here: http://channel9.msdn.com/Shows/Going+Deep/Anders-Hejlsberg-and-Lars-Bak-TypeScript-JavaScript-and-Dart http://channel9.msdn.com/Shows/Going+Deep/Anders-Hejlsberg-a... At one point, Lars and Anders both say they liked ES4 and they wondered why it died. I LOLed a lot :-|, in view of how their employers were intimately involved in killing ES4. (I write this without rancor, as ES4 needed to die.)
- ttepasse 12y ago> (… as ES4 needed to die.) Why is that by the way? From what I read at the time in the PDFs it seemed nice and not out of the ordinary. Did you ever wrote about technical failures of ES4 and I missed it?
- BrendanEich 12y agoFrom twitter (https://twitter.com/BrendanEich/status/575427109977378816 https://twitter.com/BrendanEich/status/575427109977378816): * why ES4 had to die? https://news.ycombinator.com/item?id=8906807 https://news.ycombinator.com/item?id=8906807 says why in brief: "But ES4 was trying for too much too soon." Adobe bailed, too. * (yet MS was about to give in! If only Adobe had known.) ES4 toward end was not AS3-compatible because JS wasn't AS3 compatible. * enabling incompatibilities under opt-in version selection was fairly toxic to all implementors (V8, JSC esp. ) and many users. * With 1JS idea, based on modules (classes, also generators via function*), new syntax is its own opt-in: no big red mode switch. Update: also the "ECMAScript Harmony" email I wrote in July 2008 talks about the problem of namespaces: https://mail.mozilla.org/pipermail/es-discuss/2008-August/006837.html https://mail.mozilla.org/pipermail/es-discuss/2008-August/00... The early binding problem for the Web with multiple script tags was not an issue for Flash with a single SWF link-time tooled image. The open namespaces costs can be thought of as a third lookup rib for identifiers beyond scope chain and prototype chain -- anything like this (e.g., scoped object extensions a la C#) is still bouncing off of engine implementors.
- ep103 12y agoHonestly, every time I see google pushing for another JavaScript change, I end up not liking it. Its like they're trying to slowly transform all of js into typescript / @script
- pjmlp 12y agoI wonder when we will see Dart's logo here http://www.lemonde.fr/pixels/visuel/2015/03/06/google-memorial-le-petit-musee-des-projets-google-abandonnes_4588392_4408996.html http://www.lemonde.fr/pixels/visuel/2015/03/06/google-memori...
- Touche 12y agoI would expect it's soon. It's not taken off at all and now we are seeing multiple teams in Google embracing TypeScript (Angular last week and now the V8 team).
- shurcooL 12y agoI see and hope for GopherJS or other Go to JavaScript compilers to become big players in the future. I'm already using that approach and it's great, and IMO has tons of potential.
- mavdi 12y agoNo.