I'll repeat what I said in the GitHub thread: There's this interesting tool called Google Closure Compiler. It does dead code elimination. https://gist.github.com/1277285 Notice that this source is now 2000 lines of pretty printed JS. Given that anything interesting these days uses jQuery or Underscore.js clientside, and similar things serverside, this amount of JS for even Hello World is standard fare. EDIT: To be c…
the original example should "compile" to nothing more than the following:
(function () { window.HelloDartTest = { testMain: function testMain() { console.log("Hello, Darter!"); } };
HelloDartTest.testMain(); })();