4 ms·
There's not just one killer feature. Here's a few strong features that add up: - optional static type annotations - advanced object-oriented features (mixins
by WoodenChair 12y ago
There's not just one killer feature. Here's a few strong features that add up:
- optional static type annotations
- advanced object-oriented features (mixins, advanced constructors, etc)
- rich built-in libraries
- pub package manager
- 2X V8 performance w/ the Dart VM
- integrated tooling
- exceptions
- generics
- operator overloading...
I could go on, but basically I'm not sure what language you were looking at because Dart has a lot that plain vanilla JavaScript does not (although can have with extensions). It also doesn't inherit all of those flaws JavaScript got from being designed in a time crunch (10 days is really not enough time to design a language).
If I had to pick one though, it would probably be the fact that Dart is a platform (rich language, libraries, tools, and package manager) rather than hodge podge of frameworks on top of a lightweight language.
- ajizzle 12y agoIf 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.
- 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.
- pavlov 12y agoBased on that description, Dart sounds like Google's version of Adobe Flex. I suspect that experience has shied people away from the idea of relying on a single-vendor platform for web apps. We tried "rich Internet applications" and they weren't a lasting solution; both Adobe and Microsoft gave up on their efforts. Google's solution has a plain-JS fallback which Flex and Silverlight couldn't do, but otherwise the Dart world view seems similar: one vendor, one monolithic platform, one preferred runtime.
- WoodenChair 12y agoThat seems the general skeptic's analysis - and it has some validity - but let me point out a few things that make Dart seem a bit more open: - It compiles to JS (you mentioned this) - It is standardized by ECMA - The entire platform (VM, compiler, libraries, IDE, etc) is open source I guess how you feel about Dart may depend on how you feel about Google and big corporations more generally. Just because a big company that has a lot of mindshare/marketshare creates a great platform, does that necessarily mean we should be afraid of it? Maybe, but if you're frustrated by JavaScript, it's certainly worth a look.
- pavlov 12y agoExcept for the JS transpiler, Microsoft Silverlight could make similar claims: the CLI runtime is standardized by ECMA, and the entire source code for the .NET Framework is available. (Granted, not the Visual Studio IDE.) For these kinds of platforms, post facto standardization efforts and code releases are part of marketing, IMHO. Dart remains a Google-lead project tied to Google's goals rather than an actual open platform.
- WoodenChair 12y ago> Dart remains a Google-lead project tied to Google's goals rather than an actual open platform. Right, I agree with you. I guess you didn't read my whole post. To quote myself from just above: "I guess how you feel about Dart may depend on how you feel about Google and big corporations more generally. Just because a big company that has a lot of mindshare/marketshare creates a great platform, does that necessarily mean we should be afraid of it? Maybe, but if you're frustrated by JavaScript, it's certainly worth a look."