4 ms·
CoffeeScript played an important role in the development of ES6, but looking forward, it seems to have a same-but-different set of features vs. actual JavaScrip
by twerquie 13y ago
CoffeeScript played an important role in the development of ES6, but looking forward, it seems to have a same-but-different set of features vs. actual JavaScript, which may doom its future.
- xixixao 13y agoJavaScript will never adopt CoffeeScript syntax and will retain quirks for backwards compatibility (such as the == operator). CoffeeScript may very well settle on features, but only JavaScript's death could doom it - and that seems unlikely.
- thedufer 13y agoA doom dependent on full adoption of ES6 could easily be a decade out, to be fair. There aren't, as far as I know, any browsers that expose ES6 without non-standard compile/runtime flags, and we have to wait until there's enough adoption that the % of people using pre-ES6 browsers is negligible. Hell, I'm still waiting for Array::map to be dependable.
- jashkenas 13y agoHell, I'm still waiting for [1, 2, 3].indexOf(2) to be dependable ;)
- twerquie 13y agoMDN publishes correct polyfills for ES5 Array functions like map, reduce and forEach. I think it's worth shipping those and using them now. Ultimately though, wouldn't you want to use a js preprocessor that lets you write full spec ES6 and compiles down to ES4 or whatever your runtime target is? That's available today, and it doesn't confuse the meaning of class, fat arrow, variable scoping, etc.