Why is javascript files generated by dart is so huge? Why is javascript files generated by dart is so huge? dart dart

Why is javascript files generated by dart is so huge?


What problem are they trying to solve by generating such huge javascript files?

The problem of balancing Dart to be optimal in the majority of cases, rather than just this one personal, specific, contrived, useless example program that nobody would ever seriously try to use in a production project.


If you would like to get even a better JavaScript, try the Frog compiler instead of DartC. Frog ist written in Dart itself.

http://turbomanage.wordpress.com/2011/12/09/dart-dev-mode-cometh/

Note, this blogpost above is a bit outdated. You can meanwhile use the Dart SDK for Frog:http://gsdview.appspot.com/dart-editor-archive-continuous/3058/

This post might also be of interest for you, Seth shows how the Frog generated JS looks like:http://blog.sethladd.com/2011/12/10-lessons-from-porting-javascript-to.html

Here is how you can enable Frog in current Editor:https://groups.google.com/a/dartlang.org/group/misc/msg/5dfe04c69ed0fed3


Why is the javascript code which was generated from a dart code by a dart compiler is so huge?

Because it includes a Dart runtime.

What problem are they trying to solve by generating such huge javascript files?

The problem of running code that is not JavaScript in a browser.