Yes and no. Although we get some fantastic features, one of the most critical- the ability to neglect parens and curly braces- is lost in es6. I'm working on an es6 project right now and still prefer coffeescript.
Replace CoffeeScript with ES6
21–30 of 178 posts
Re: Replace CoffeeScript with ES6
#22Note that self = this is kind of a legacy hack for binding 'this'. ES5 has Function.bind https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
If you want to call something that increases performance by 50% a hack, feel free, but I'm going to use that hack until that's not the case.
Re: Replace CoffeeScript with ES6
#23I give credit to CoffeeScript with really helping to push the ES specs forward and think it helped introduce more people to JS and grow the ecosystem. Heck, I used it for a year, liked it, and had it change some of my approaches to writing JS. That said, I hope it slowly fades into the background as more people go back to vanilla ES6 or go with something more powerful such as TypeScript (or Flux). With the progress a…
It's also possible folks will continue forking and improving CoffeeScript so that it keeps up with future releases of vanilla js (which is actually what I hope will continue to happen). Folks like me who come from a Ruby / Python background really don't like brackets and declaring variables, so things like Coffeescript, LiveScript, CoCo, etc. are wonderful tools even despite their occasional moments of weakness. That…
Re: Replace CoffeeScript with ES6
#24Many people don't like that CS needs to be compiled. I don't see this as an issue since pretty much every application I work on these days is concatenated and uglified. So adding a JS compiler is already part of most JS application's build process. 6to5 is being compiled to ES5 anyway. Also, if you include in your build pipeline a source mapper, debugging is not a problem.
Re: Replace CoffeeScript with ES6
#25For those using browserify, you can use es6ify to compile ES6 to ES5 on the fly. https://github.com/thlorenz/es6ify
Re: Replace CoffeeScript with ES6
#26Re: Replace CoffeeScript with ES6
#27Earlier quoted context omitted.
Because one day ES6 will run in browsers without a build step.
In my experience all non-trivial frontend project I've worked on have ended up with some kind of build step (minification, linting, concating, ect), with or without a compile2JS language. This isn't an issue for node projects as you can simply `require` the `coffee-script/register` module and node handles coffee scripts for you via normal `requires`.
Re: Replace CoffeeScript with ES6
#28Earlier quoted context omitted.
If you want to call something that increases performance by 50% a hack, feel free, but I'm going to use that hack until that's not the case.
Do you have a source? I don't understand how a closure over a single variable (this), instead of reassigning the value of the variable in a specific scope, would result in a 50% improvement in performance. Also -- the phrase "50% improvement in performance" itself is kind of dubious, no?
Re: Replace CoffeeScript with ES6
#29Earlier quoted context omitted.
Because one day ES6 will run in browsers without a build step.
I'm not sure that's a convincing argument – you will in almost every conceivable case have a build pipeline in place anyway, so there's not really a cost there.
Re: Replace CoffeeScript with ES6
#30ES6 has 'let', while CoffeeScript has an '=' that might be local binding and might be nonlocal assignment, depending on what's in scope. I wanted to like CS, but I don't want to live with that one decision.