Live data from Hacker News

"Hello World" in Dart, compiled to JavaScript

gist.github.com

61–70 of 162 posts

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

#61
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 should be grasping for any chance to leave the warty and dated pile of compromises that is Javascript behind. Even the javascript community seems to tacitly admit that Javascript is a bit of diamond amongst a whole lot of dross; hence CoffeeScript and books like "Javascript: The Good Parts".

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

#64

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…

Amen. The "me too" culture that's going on w/r/t Dart is really disappointing.

Google: "Hey everyone, let's make the browser better by switching to something that smells less like garbage than javascript."

Community: "You forgot a semi-colon!"

Shameful.

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

#65

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…

"...given that they should be grasping for any chance to leave the warty and dated pile of compromises that is Javascript behind..."

I would not characterize the JavaScript community as desperate graspers, but even so, I don't see the virtue in grasping for the chance to replace a dated pile of compromises with a contemporary pile of compromises. All the hate is totally overblown - this project is young and will likely improve a lot over time - but that doesn't change the fact that what we've seen of this project so far places it squarely in the category of 'novelty.'

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

#66
post #55
post #49

Earlier quoted context omitted.

CoffeeScript is meant to be synaptic sugar on top of JS. Dart is a language with different semantics that happens to compile to JS. As such it includes a lot of runtime code. More appropriate examples would be Emscripten, Parenscript, or ClojureScript.

There is a legitimate point here though. If I'm a developer working on a new project, and I'm dissatisfied with JavaScript, I have a couple of options. I could try Dart, which will cost me a significant amount of performance in all browsers that aren't Chrome, or I could go with CoffeeScript, which will have good performance in all browsers (including Chrome, since Chrome will be forced by the other browser manufactu…

Anything happening in a client browser will involve a significant amount of IO - querying / modifying DOM and remote requests. I don't think that choosing Dart over CoffeeScript is going to make much of a difference for most applications.

See Objective-J / Cappuccino which chose to eat the very real overhead messaging in order to gain expressiveness. How many JS apps are as responsive / elegant as 280 North Slides?

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

#67

Earlier quoted context omitted.

compilers are supposed to optimise what they spit out, so why is this spitting out either a) terribly inefficient code or b) a whole heap of un-used code?

1. Not necessarily, as shown here, Google has a separate optimization step. If you look at the other posts you will see that using other google products, such as closure compiler/etc will make this all significantly smaller. This makes sense . Have the guys who know how to make JS small work on that problem, thus benefiting BOTH hand rolled JS code and Dart-compiled JS code. If not you are eternally having to do merg…

The "other tool" you mention reduces this to 2300 lines, and that's with the "remove unused code" option enabled.

Still fails.

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

#68

I don't understand why Dart is supposed to be good, someone please explain it to me like I'm an eight-year-old

> I don't understand why Dart is supposed to be good It's like Go: "It's from google, so awesome by default".

Go is awesome by default because of Ken Thompson, not because of Google.

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

#70
post #64

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…

Amen. The "me too" culture that's going on w/r/t Dart is really disappointing. Google: "Hey everyone, let's make the browser better by switching to something that smells less like garbage than javascript." Community: "You forgot a semi-colon!" Shameful.

Sorry but it's been more like

Google: Hey everyone, we have decided the future, here it is, get used to it.

Community: Maybe you should get behind Harmony instead of secretly building replacements to the building blocks of the web and issuing them by imperial decree.

Post reply on HN