r/javascript • Web Components fanboy • Jul 14 '12

Dart: Structured web apps

http://www.dartlang.org/
0 Upvotes

3 comments sorted by

6

u/[deleted] Jul 14 '12

I don't think I'll be using Dart until it's been implemented natively in at least 3 of the tier 1 browsers and that is probably a while away yet. Compiling down to JavaScript sounds like it will be really, really slow and unoptimised no matter what marketing spin they put on it. Show me the non sponsored benchmarks for the performance of code written in JavaScript by itself, Dart, then Dart compiled to JavaScript. JavaScript should not be the assembly language of the web however I can see a use for it for older browsers. But if you don't even have a native implementation in the current browsers (Firefox, Chrome, Safari, Android or Opera) then basically you're just another CoffeeScript. I prefer to write native JavaScript rather than using some other layer on top of it. Really I think they should focus on having the good functionality of JavaScript and jQuery then getting the browser vendors to implement it. Probably sometime in 2014 or later I'll be able to start using it in my HTML5 only sites.

0

u/[deleted] Jul 15 '12

[deleted]

1

u/[deleted] Jul 16 '12

If I compiled a simple program written in C down to assembly most of the time that's going to be slower than if I hand wrote and tuned the assembly code to do the same thing. You can throw all the optimisations you want in there for compiling from Dart to JavaScript and throw out big names like 'V8 developers' but most of the time it's going to be slower than native. You just have to look at the compiled JS code to see the bloat. Anyway if they can somehow magically produce faster JavaScript code than writing it natively then everyone should just write Dart code obviously. I bet you could get the same performance though from running the same optimisations/branch prediction stuff on the hand written JS as well. But anyway lets see the raw benchmarks of compiled Dart code beating native JavaScript and the results not sponsored or 'massaged' by Google to paint it in a good light.

10

u/albireox Jul 14 '12

Is it just me or does anyone else prefer JavaScript?