We all know the benefits of offloading code to a well known and well tested library or framework, especially if you're writing an app that is thousands of lines anyway. How is this contentious at the end of 2011 unless you're just hating Dart for the sake of it?
I haven't looked into the language yet and unless you haven't either let's all refrain from judgements based on this silly metric alone. Circle jerks and knee-jerk reactions are for Reddit, not HN.
Don't get me started on the whining about math performance. Reminds me of dinosaurs whining about how assembly is better than C is better than Java is better than.... There is more to software development than math. Crazy, new fangled, inefficient languages eat the lunch of older languages every single time. You have to be insane to pull out that gem. If math is your bottleneck then don't use Dart, if you know that math is your bottleneck then you shouldn't have to be told this! Sorry for the rant but half of the complaints I've read about Dart are utterly ridiculous, and speculative to boot.
jQuery is 9000 lines, uncompressed with all the comments.
I call that about the same order of magnitude as the things you mention, hardly "next to nothing".
Additionally, just about every line in jQuery is actually useful for something, even the optimized code seems to mostly consist of a whole load of getters and setters and definitions of what addition and multiplication does.
> I haven't looked into the language yet and unless you haven't either let's all refrain from judgements based on this silly metric alone.
Lines of code stops being a "silly metric" when the numbers get really big, as they do here.
> Don't get me started on the whining about math performance. Reminds me of dinosaurs whining about how assembly is better than C is better than Java is better than.... There is more to software development than math.
Surely you didn't mean "There is more to software development than performance." :-)
Easy to pick off "math". But is this stuff not supposed to run in a browser? I'll reconsider when I see a simple application running smoothly on a cheap 3 year old desktop PC.
No, a Hello World program that compiles to 170kloc is what is ridiculous. That you can optimize it to 2kloc is nice, but it's still just a Hello World program.
And a more serious program, how big would that be?
> "There is more to software development than performance."
It's just a matter of what we mean by "performance". Time to run? Time to develop? Adoption rate? Income generated? Fame?
Software is always about doing something better. The controversy comes when we try to evaluate "better."
Underscore is under 1000 lines unminified and with all comments.
> Don't get me started on the whining
What is it with all the hostility from the people defending Dart? How about you display some of this expected HN behaviour yourself?
I do have an issue with this trend of building VMs on top of VMs, abstracting further and further away to the point where we're using 1000 times more CPU cycles than in the 80s to run the same Pacman in the web browser. I'm for translation rather than virtualization I guess.
Just for the record I'm not saying Dart is amazing and everyone should use it, all I'm saying is that we should evaluate it objectively. If raw speed is your bottleneck then why are you wasting time evaluating Dart? Nobody is forcing anyone to use it, you can ignore it and move on with your day.
Underscore.js and Backbone.js put together are 1/8th the size of HelloDartTest.dart.app.js.
jQuery plus dozens of jquery.ui plugins can come close in size, but that actually does a lot. This boilerplate doesn't seem to have much functionality in it.
The problem here, and what is making us chuckle so much, is that the project as presented to us is not magical. For whatever reason, some of the brightest minds in our industry have not presented us (at this time) with a cross-compiler that is both robust enough to support large apps, and intelligent enough to self-optimize its output.
I wonder where this is on the path to the singularity?
I moved things around so that what code does is roughly equivalent. As you can see Dart is slower, but the Dart runtime does not differ by a margin that matters for many applications - and note the size of the gap differs significantly between JS engines.
print$getter()(1, $noargs, 'Hello, Dart!');
print$getter()(1, $noargs, 'foo');
print$getter()(1, $noargs, 'bar');