Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a very simplified answer, but here's my take:

CoffeeScript says that the main problems with JS are the inelegant C-style syntax and a few semantic trip wires. It addresses those while still keeping the underlying semantics, APIs and ecosystem.

If what drives you up the wall about JS is stuff like the DOM, or JS's object model, CoffeeScript won't help you much. If you are OK with how JS behaves and like the very large JS ecosystem, CoffeeScript can be a nice fit.

Dart takes a much larger semantic step away from JS. Syntactically, it's more similar to JS than CoffeeScript is. It sticks with braces and statements, and the whole C kit and kaboodle.

However, semantically, it's much different. It has a full-featured class system with inheritance, mixins, getters, setters, operator overloading, etc. It has a static type system so you get the nice tooling experience you expect from a language like Java or C#. It also completely revamps the DOM APIs to (hopefully) be more rational, modern and consistent.

The cost, though, is that interacting with the existing JavaScript world is a little more difficult. You can interop, of course, but it isn't as seamless as CoffeeScript.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: