Linked by Thom Holwerda on Mon 10th Oct 2011 20:14 UTC, submitted by twitterfire
General Development "Google has released an early version of Dart, a new programming language designed to take some of the pain out of developing applications for the Web. But while it's an evolutionary improvement on JavaScript, Dart faces a hard uphill battle for acceptance."
Thread beginning with comment 492452
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: js
by kloty on Mon 10th Oct 2011 21:52 UTC in reply to "js"
kloty
Member since:
2005-07-07

If I understand correctly it is possible to translate Dart into Javascript. Please look at Point 3. in this file https://code.google.com/p/dart/source/browse/branches/bleeding_edge/...

Reply Parent Score: 1

RE[2]: js
by fromz on Mon 10th Oct 2011 22:48 in reply to "RE: js"
fromz Member since:
2011-10-10

Yeah I saw that too -- doubt it can use existing javascript libraries though - which is neither here nor there, I suppose. If the project were to succeed, in time we would see dart libraries created to fill the void. In that case, we could write in dart and convert to javascript for browsers which don't support dart natively.

Reply Parent Score: 1

RE[3]: js
by Spiron on Tue 11th Oct 2011 00:23 in reply to "RE[2]: js"
Spiron Member since:
2011-03-08

The ability to code in Javascript isn't being removed for sometime yet, that would be stupid. most sites these days incorporate some javascript so they wouldn't remove the ability to parse it for some time yet. All that dart is is a more senseible language for creating web-applications on, which is possible in javascript its just a pain

Reply Parent Score: 1

RE[3]: js
by Bill Shooter of Bul on Tue 11th Oct 2011 14:16 in reply to "RE[2]: js"
Bill Shooter of Bul Member since:
2006-07-14

Well, the main reason why I use Js libraries is because they make up for things that JS is missing. If dart already has them built in, then my use cases for those JS libraries is greatly decreased.

They are planning on modifying GWT to output dart at some point as well, and have hinted at a 100% dart version of it ( dart running on server, dart running in client).

Reply Parent Score: 2

RE[2]: js
by vivainio on Tue 11th Oct 2011 18:45 in reply to "RE: js"
vivainio Member since:
2008-12-26

If I understand correctly it is possible to translate Dart into Javascript. Please look at Point 3. in this file https://code.google.com/p/dart/source/browse/branches/bleeding_edge/...


Check out what Dart "Hello World" looks like when compiled to Javascript:

https://gist.github.com/1277224

No kidding.

CoffeeSctipt, OTOH, maps to JS quite directly.

Reply Parent Score: 2

RE[3]: js
by adinas on Wed 12th Oct 2011 12:33 in reply to "RE[2]: js"
adinas Member since:
2005-08-17

Only 17,259 lines of code. I can write that in less than a week. :-O

Reply Parent Score: 1

RE[3]: js
by benhonghu on Wed 12th Oct 2011 23:14 in reply to "RE[2]: js"
benhonghu Member since:
2008-08-24

Well Dart really is not supposed to be translated to Javascript to begin with. Once it's got its own VM on chrome I'd expect it to be lighter and faster than JS.

Reply Parent Score: 1

RE[3]: js
by tbcpp on Thu 13th Oct 2011 12:44 in reply to "RE[2]: js"
tbcpp Member since:
2006-02-06

I think the point is that you will then run the output of Dart through the Google Closure compiler. In that way all the extra cruft is stripped out.

ClojureScript does the same thing. A stock "unoptimzied" "Hello World" is pages and pages of standard library functions, but it is also designed to run through the Google Closure (no j in this case) compiler and have all the dead code removed. After that, you're left with a very compact optimized file.

Reply Parent Score: 1