Live data from Hacker News

"Hello World" in Dart, compiled to JavaScript

gist.github.com

131–140 of 162 posts

Re: "Hello World" in Dart, compiled to JavaScript

#132
post #22

Funny. But to be fair, a Hello World in C compiles to a 27k binary. Yeah yeah, optimize this, leave out that and you can get it smaller. Still doesn't change the fact that Hello World is not the target use-case for either C or Dart. Dart is intended for very large applications (compared to JS), so the additional weight for includes isn't that big of a deal. It also doesn't change the fact that Dart sucks. For other r…

On 32-bit Linux GCC, C hello world comes out to only 7 KB. Without optimization.

Re: "Hello World" in Dart, compiled to JavaScript

#133

This is called "a runtime". A bunch of things that have to be loaded on the target machine for use by a compiled program. Just about every compiler works this way, whether the output is machine code or JavaScript. It is possible to not emit or load the parts of the runtime which will not be used by a given program, but that's difficult and in many cases even impossible. I am not a web programmer, and I don't use JS a…

This thread answers how long a Hellow World executable is: http://news.ycombinator.com/item?id=3098672

Re: "Hello World" in Dart, compiled to JavaScript

#136

So the joke is that a prototype of a whole separate language has to include its runtime in its cross-compiled output? Did people... think this wouldn't be the case? Do they think that Javascript is not thousands of lines of C/C++ lurking in your browser? Good joke guys, but I don't think you realize which way the punchline is pointing... It sort of amazes me that people are being so hard on Dart, given that they shou…

> Do they think that Javascript is not thousands of lines of C/C++ lurking in your browser?

C/C++ compiles to native code. Besides, how is that justification to add even more layers?

Re: "Hello World" in Dart, compiled to JavaScript

#137
post #25

As me1000 (Randy Luecke) says Dart is not meant for hello world. If you run this through closure-compiler it's reduced to 2000 lines which is nothing next to Underscore, jQuery, Dojo, etc. 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…

> 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.

With the halt in processor speed increases and the move to mobile devices, performance and efficiency have become important again, actually.

Re: "Hello World" in Dart, compiled to JavaScript

#138
post #77

Earlier quoted context omitted.

I'll take the alleged mob mentality over Google elitism any day of the week. Google can try to move the web any direction it feels is appropriate - it's Google's time, it's Google's money - but let's be clear: JavaScript is not as deficient as you might think it is, and the JavaScript community is not dumb to expect more than what Dart has offered so far (in an admittedly short span of time). "There are just two kind…

"Probably over-quoted these days, but I think we all know where JavaScript falls." Well, if the distinction is between the ones nobody uses and the one "everybody complains about", then we also know where Dart falls...

It's off to an auspicious start ;)

Re: "Hello World" in Dart, compiled to JavaScript

#139

It's official now: Dart is meant as a practical joke to show why Javascript needs to be replaced by something sane like a bytecode VM. Either that, or I don't want to surf this internet anymore.

"Javascript needs to be replaced by something sane" really? You should read what the goals are for Dart.

Re: "Hello World" in Dart, compiled to JavaScript

#140
I think the problem of Dart and Google's many strategies in web application developer tool area is the belief that the current state of web app development is in a very serious terminal illness that requires chemotherapy, with a complete change of how we do things, while many others - notably the CoffeeScript camp - have shown that we are still essentially in good shape and all we need is some herbal tea to help the immune system. I am not discounting the value of the bold move of Google, but I am very disappointed to see a big negligence of the good parts of JavaScript and other dynamic languages and a blind copy of Java (mis)features. I have not seen Google contributing to the common and popular JavaScript frameworks like jQuery (and Microsoft did... what a strange world). Maybe it's NIH syndrome at play.
Post reply on HN