
Ask HN: Shall we use Coffeescript or ES6? - sagivo
we build a new project with nodejs. we love the coffeescript syntax but seams like ES6 has a lot to offer as well. 
what should we use?
======
ryanthejuggler
Honestly, ES6 offers many of the advantages of Coffeescript (arrow functions,
destructuring, etc.) and has the advantage of being a standard that will soon
be natively understood by browsers, is fully backwards-compatible with ES5
(and therefore widely understood by developers), and also has a lot of IDE
support and tooling available.

------
alexfreska
ES6 is quickly becoming the norm and now with Babel there is no reason not to
embrace the future. [https://babeljs.io/](https://babeljs.io/)

------
jessaustin
If you love coffeescript syntax, ISTM you'll be happier in coffeescript. That
isn't to take anything away from ES6, but coffeescript is just as capable, and
your aesthetic preferences are more valid for you than anyone else's would be.

------
cnp
With Babel you can always be sure you're on top of things, with experimental
stages being available to the user for testing future language proposals (ES7,
ES8, ES20) and a to-die-for plugin architecture. ES6 has become pretty minimal
--not as minimal as CoffeeScript, but getting there, with things like:

let { destructured, vars } = myObject

let foo = (num) => num * 2

class Foo extends Bar {

    
    
      constructor() {
        this.callFoo()
      }
    
      callFoo() {
         // Note the simple syntax
      }

}

Also, remember: no need for semicolons, but be aware when they can hang you
up! (IIFE's, etc).

------
n17r4m
Livescript - [http://livescript.net](http://livescript.net)

~~~
naturalethic
+1 your microscopically sized comment

------
citrusx
Use CoffeeScript.

Even after all the work that TC39 put into ES6/ES2015, it's still not nearly
as well done or helpful as CoffeeScript is. You'll be going against all of the
"cool kids" by rejecting ES6, but you'll also be much more productive and
happier.

------
fibo
There is more than a way to do it. Coffeescript is a nice language, it can be
a good choice, depending on the task (for example, atom is written with
CoffeeSCript). And don't forget it "is simple JavaScript", you can mix both.
ES6 on the other hand will be a great improvement. I am sure CoffeScript will
evolve the transpiler to target ES6 too.

------
seaneking
Another vote for ES6 - it covers the most important fixes from coffeescript
and is the next standard, so you're not writing in a DSL (don't have to worry
about it going out of fashion, wider talent-pool in the future, etc.). And
with Babel you can use it now and just transpile back to ES5.

------
serve_yay
My team uses ES6, today, with Babel. Recommended.

------
borplk
ES6 and compile with Babel (I've tried every possible combination that you can
name, and settled with that as the best choice)

------
weatherlight
Are there plans to make coffeescript ES6 compatible?

~~~
jessaustin
It already is, in that any ES6 interpreter can run the javascript that
coffeescript produces. Perhaps you mean to ask whether there are plans for
generated code to use ES6 features? Before ES6 is universal, that would set up
a more complicated build chain (before we used coffeescript; now we have to
use both coffeescript and babel). Also there is no point. Everything ES6 can
do, can already be done in coffeescript.

------
danopilus
You 'shell' choose for yourselves?

------
vilmosi
Answer is simple: ES6

------
je42
ES6.

------
honest_joe
I would say ES6 for anything that will be worked on by more than 2 people.
CoffeeScript for one man show projects.

But honestly...ES6 will be the norm and you should know it anyway. So the
question is..If you already know CoffeeScript should you keep using it ? The
answer is YES ! If that makes you happy why not. But keep an eye on ES6 and
learn it.

More delicate question would be. If i start with JS should i learn ES6 or
CoffeeScript first ?

~~~
sagivo
_CoffeeScript for one man show projects._

what? why? we are a team of 8 working with it and it's great.

