What are the main differences between CoffeeScript’s and Dart’s improvements upon JavaScript? What are the main differences between CoffeeScript’s and Dart’s improvements upon JavaScript? dart dart

What are the main differences between CoffeeScript’s and Dart’s improvements upon JavaScript?


Seth Ladd has a blog post where he compares certain aspects of CoffeeScript with Dart and JavaScript. Doesn't touch on all of your bullets, but may be a start. He also posted this discussion in response to a Coffeescript and Dart article on nettuts.


To add to Richard G's great links:You can use JavaScript inside CoffeeScript http://coffeescript.org/#embeddedTest out CoffeeScript on that site; lots of great examples.

IIRC, Dart was its own language at first. When the dev community were not so open to Dart (either "meh" or "ugg"), then Google tacked on JavaScript cross-compiling to Dart. Native Dart is ultimately to compete with JavaScript. Dart is alpha-quality now; I'd skip it unless you are into testing alot.

To me, a better question would be, "Should I develop in CoffeeScript or Haxe JS?"


I found a new vid on MarakanaTechTV that has some comparison of Dart vs JS (mostly tied to Dart's VM, not when rendered to JS from Dart). Highlights:

  • More class based (as opposed to JS's prototypes, which are similar, but dart is more like Java & C++ here. This helps makes Dart faster, since calls don't have to travel up Prototype chain.)
  • Objects sizes may be static & dense, helping object-arrays run faster. Though you can use "map" if if you want holely arrays.
  • Int maths are readily available, which are faster than double-floats (which JS more or less is always).
  • Dart has SIMD which can reduce large dataset CPU usage (eg images, audio, video, 3d, huge tables). Though unless you plan to process graphics, audio, or large tables of numbers inside the browser, this will not matter to you. (BTW, I disagree with the speaker; my own translations into SIMD for DSP shown switching to SIMD does take some "overhead", since a SIMD opcode does take 1 or more cycles over the typical double/int opcode, & you have to spend opcodes to translate between SIMD & the 'old' maths. That said, even using SIMD for 2-channel (like stereo audio), you can save a minimum of 20% CPU, & up to 3.7x speed gains if you use all 4 channels).

And another "Why Dart?" vid for web devs. Handy language sugar/shortcuts: named constrictors, lexical 'this.', method cascades. Built-in data binding like Angular.js.