3 ms·
I'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->ES
by joshstrange 12y ago
I'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.