On Tue, Oct 11, 2011 at 12:42 PM, John J Barton <johnjbar...@johnjbarton.com > wrote:
> > > On Tue, Oct 11, 2011 at 6:41 AM, Juan Ignacio Dopazo < > dopazo.j...@gmail.com> wrote: > >> Hi! Is there anyone working on a Harmony "transpiler" besides Traceur? > > > I'd like to understand why Traceur is not suitable. As far as I understand > it was written to study new directions in JS. > > Traceur is very good! I'd just like to have something that compiles to ES5 without intermediate libraries, the way CoffeeScript works, so that it's easier to debug and use in NodeJS. Traceur does this very well for certain features, like arrow functions and the rest operator. But classes still use library code and aren't very human readable. See: class Person { constructor(name) { this.name = name; } } ... is compiled to: var Person = traceur.runtime.createClass("Person", null, null, function(name) { this.name = name; }, undefined, { }, function $static() { }, null); Compare it to CoffeeScript: class Person constructor: (name) -> this.name = name sayHi: -> 'Hi!' Coffee to JS: var Person; Person = (function() { function Person(name) { this.name = name; } Person.prototype.sayHi = function() { return 'Hi!'; }; return Person; })(); Juan
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss