6 ms·
If it compiles down to javascript then it does have the same flaws as javascript. 2x performance of v8 is bullshit, and "rich built-in libraries" and "integrate
by ajizzle 12y ago
If it compiles down to javascript then it does have the same flaws as javascript. 2x performance of v8 is bullshit, and "rich built-in libraries" and "integrated tooling" are just marketing drabble. If you understand what they actually mean please explain or gtfo.
- WoodenChair 12y agoSure, I'll explain each one. Performance - Dart has its own VM which runs independently (on the server, or in special builds of Chrome, but soon to be mainline Chrome). So it's not just a language that trans-compiles to JavaScript, it's also a language with its own independent high performance VM that you can use on the server today and the browser tomorrow (hopefully). By the way the Dart VM was written by the same guys that created V8 - generally considered to be one of the highest performance JavaScript VMs - so I think we can believe them when they say it's higher performing. Rich Built-in Libraries - Just take a look here: https://api.dartlang.org/ https://api.dartlang.org/ There's everything from a reflections API to a WebGL library. There's JavaScript interop libraries, concurrency libraries, and the equivalent of jQuery built-in. That's just scratching the surface. Integrated Tooling - Dart has its own package manager (pub) which is quite nice as well as its own IDE (Dart Editor) which comes with a debugger, profiler, and all the niceties you'd expect (code completion, deployment help, etc). It's also a new language (less than a year since 1.0) backed by a big company so these things are only going to continue to improve.
- jeswin 12y agoThe wider adoption of Dart is a pipe dream, and the fact that it will remain confined to Chrome is a very good thing. The web community should reject this, or we'll soon have only one browser and one true master of the internet. - No other browser can practically implement or support Dart. If they do their implementation will be slower than Google's, and will get classified as inferior. Google has in abundance the time and money to build and fix bugs, which Mozilla and Opera may not have in the near future. - Google's engineering could have gotten JS much farther along, but from what I have read on Twitter the V8 team has been shuffled around and the focus of innovation on Chrome is Dart. - See how Chrome trails Firefox in ES6 here: http://kangax.github.io/compat-table/es6/ http://kangax.github.io/compat-table/es6/ (Thankfully, arrow functions are landing soon). There is no other way this would be played out, and the plan from the outset must have been to push Dart forcefully using Google's distribution capability on the web and on devices. I am waiting for Servo to launch to become a full-time Mozilla cheerleader again, once again after Internet Explorer's heydays.
- WoodenChair 12y agoI'm not sure exactly what I said that you're replying to (or if you're just replying to my Dart boosterism more generally) but what you seem to be addressing are political issues (who controls the Web, where resources are allocated) and not technical issues. Considering that Dart is open source, standardized by the same international body as JavaScript (ECMA), and compiles to JavaScript I think the argument against it would be weightier if it was made on technical merits. But I agree that it would be dangerous for one company to control the web - but like you said it's a pipe dream that Dart will gain wider adoption - so why worry yourself by writing all that about it? You can't say it will never gain wider adoption and then also be worried about it gaining wider adoption at the same time. So either it has merit and will gain adoption and we should be worried about it, or it doesn't have merit and there's nothing to worry about.
- jeswin 12y agoDart will never be adopted outside Chrome, but there is plenty to worry about already. - Google can push Dart the same way MS did with ActiveX - C# is an ECMA standard too; how well did Mono fare in the early days and even now after more than ten years? - The relegation of JS innovation to second place behind Dart is a cause of concern. HTML and JS are the basic foundations of our web.
- mythz 12y ago> Dart will never be adopted outside Chrome This is an incorrect. Dart2JS is an implementation of the Dart specification that transpiles to JS and is supported by every modern browser. Dart also has great support for Source Maps letting you debug (JS Transpiled) Dart code in other browsers via source maps. The Dart team expect Dart2JS will be the primary way of running Dart which is why they've designed the language so that it transpiles well to JavaScript as a primary objective - i.e. they've often rejected language features which can't be implemented efficiently in JS (e.g. non-local returns). It's also not clear if Opera (by virtue of Blink) will adopt Dart once it lands into Chromium/Blink. > Google can push Dart the same way MS did with ActiveX ActiveX is a proprietary binary blob that has nothing in common with Dart. Dart is entirely Open Source, runs on all modern browsers and integrates cleanly with the DOM (i.e. like JS). > C# is an ECMA standard too; how well did Mono fare in the early days and even now after more than ten years? Only the language is a standard which Mono's compiler and runtime has excellent support for. The biggest problem Mono faces is that they've had to re-implement the massive .NET Framework class libraries themselves. This is not an issue with Dart because they entire platform (VM, Class Libraries, Tools, Analyzer, etc) is Open Source, so the same implementation can be used everywhere as-is.
- masklinn 12y ago> If it compiles down to javascript then it does have the same flaws as javascript. That makes no sense whatsoever. As evidence, I submit that Haskell can be compiled to C (and to javascript these days).
- eru 12y agoAnd that most compiled C programs have better performance than someone trying to code assembly by hand.