Live data from Hacker News

"Hello World" in Dart, compiled to JavaScript

gist.github.com

151–160 of 162 posts

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

#151

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…

> I am flabbergasted that a bunch of techies are going wild and posting facepalm pictures over a perfectly normal technical situation

Have you actually met any techies lately?

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

#153
post #144

Earlier quoted context omitted.

> This is called "a runtime". > I am not a web programmer You see, it's not a spherical runtime in vacuum. In practical terms it's more like a whole lot of stuff to download, parse and execute each time your browser hits a new page.

shrug I bet most of the people including JQuery on their pages only use a fraction of its functionality even though it all must be parsed. So what?

jQuery can be cached.

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

#154

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…

Yes, but I don't have to download the umpteenth thousands of C/C++ code that comprise the javascript engine and compile that each time I download jQuery.js.

Now, to be fair, I did a check of Lua, and it's 16,370 lines of C code (version 5.1.4, with all the current patches), so yes, 17,000+ lines of code for a VM doesn't appear quite that bad. I think what most people are complaining about is downloading that each time they hit a dart script.

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

#155
post #97

Earlier quoted context omitted.

I'd say the gist demonstrates that it's not Javascript. What you see is the entire runtime, compiled to naive js. If anything, Coffeescript is "just" js with syntactic sugar. Not that there is anything wrong with that.

that's a really interesting comment. where exactly is the line drawn between "just syntactic sugar" and "a different language"? Here we have two ways of expressing code, coffeescript and dart. Both are syntactically quite different from js, both offer features not found in js, both encourage you to write code differently to how you would in js and both compile to plain js.

> where exactly is the line

Not that I have an aswer to that, but I have the impression Coffeescript was designed specifically to compile 1:1 to matching js.

A lot of the distinction seems to depend on the local culture of the language. I've seen a lot of lispers talking about their new "language", where they add some minor feature to scheme.

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

#156
post #97

Earlier quoted context omitted.

I'd say the gist demonstrates that it's not Javascript. What you see is the entire runtime, compiled to naive js. If anything, Coffeescript is "just" js with syntactic sugar. Not that there is anything wrong with that.

that's a really interesting comment. where exactly is the line drawn between "just syntactic sugar" and "a different language"? Here we have two ways of expressing code, coffeescript and dart. Both are syntactically quite different from js, both offer features not found in js, both encourage you to write code differently to how you would in js and both compile to plain js.

> where exactly is the line

Not that I have an aswer to that, but I have the impression Coffeescript was designed specifically to compile 1:1 to matching js.

A lot of the distinction seems to depend on the local culture of the language. I've seen a lot of lispers talking about their new "language", where they add some minor feature to scheme.

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

#157
post #97

Earlier quoted context omitted.

I'd say the gist demonstrates that it's not Javascript. What you see is the entire runtime, compiled to naive js. If anything, Coffeescript is "just" js with syntactic sugar. Not that there is anything wrong with that.

that's a really interesting comment. where exactly is the line drawn between "just syntactic sugar" and "a different language"? Here we have two ways of expressing code, coffeescript and dart. Both are syntactically quite different from js, both offer features not found in js, both encourage you to write code differently to how you would in js and both compile to plain js.

> where exactly is the line

Not that I have an aswer to that, but I have the impression Coffeescript was designed specifically to compile 1:1 to matching js.

A lot of the distinction seems to depend on the local culture of the language. I've seen a lot of lispers talking about their new "language", where they add some minor feature to scheme.

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

#158
post #97

Earlier quoted context omitted.

I'd say the gist demonstrates that it's not Javascript. What you see is the entire runtime, compiled to naive js. If anything, Coffeescript is "just" js with syntactic sugar. Not that there is anything wrong with that.

that's a really interesting comment. where exactly is the line drawn between "just syntactic sugar" and "a different language"? Here we have two ways of expressing code, coffeescript and dart. Both are syntactically quite different from js, both offer features not found in js, both encourage you to write code differently to how you would in js and both compile to plain js.

> where exactly is the line

Not that I have an aswer to that, but I have the impression Coffeescript was designed specifically to compile 1:1 to matching js.

A lot of the distinction seems to depend on the local culture of the language. I've seen a lot of lispers talking about their new "language", where they add some minor feature to scheme.

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

#159
post #97

Earlier quoted context omitted.

I'd say the gist demonstrates that it's not Javascript. What you see is the entire runtime, compiled to naive js. If anything, Coffeescript is "just" js with syntactic sugar. Not that there is anything wrong with that.

that's a really interesting comment. where exactly is the line drawn between "just syntactic sugar" and "a different language"? Here we have two ways of expressing code, coffeescript and dart. Both are syntactically quite different from js, both offer features not found in js, both encourage you to write code differently to how you would in js and both compile to plain js.

> where exactly is the line

Not that I have an aswer to that, but I have the impression Coffeescript was designed specifically to compile 1:1 to matching js.

A lot of the distinction seems to depend on the local culture of the language. I've seen a lot of lispers talking about their new "language", where they add some minor feature to scheme.

Post reply on HN