85 points · by WoodenChair · 12y ago · 67 comments
And release notes: https://groups.google.com/a/dartlang.org/forum/#!msg/announc...
For some reason I never realized it could be used server side. Anyone have any practical experience with an app built entirely in Dart?
By itself it's clearly not bad, it's just not better enough than what is there already to suffer the inter-ecosystem pain with native JS. Since it can't do anything JS can't the only selling point it really has is to build large JS systems in some other safer language, but we've been there before with GWT, and that didn't set the world on fire either.
Dart just doesn't have that kind of driving force going for it.
Maybe it's that environments mean much more than languages, and with Java the JVM was the killer thing which dragged the language with it. Spark might be that killer platform for Dart, but it strikes me as wishful thinking, especially with players like github coming into that side of the market.
I've been meaning to write a blog post on my experience with Dart and StageXL, but as far as the Dart part of things, a few misc. observations:
* Dart shows a lot of influence from Java, and obviously some tinges of JS. I don't really care, I wanted a productive web language with optional static types.
* It is a "boring" language in that it's not doing anything new or earth-shattering syntactically or conceptually. This ended up being a positive to me, in that I was able to ramp up extremely quickly. I'm a Pythonista by trade, I know enough JS/CoffeeScript to get by, and I've got a little bit of Java experience.
* Dart comes with so many tools, to the point where I'm not constantly trying to find and piece together core components like "module" imports, package managers, unit test frameworks, documentation generators, IDE. Not all of the tools are extremely polished at this point (their package browsing/searching site is incredibly basic), but there is a clear "way" to do most things. There's nothing stopping anyone from writing alternatives to the official stuff, either.
* The Dart->JS interop is OK for simple usage cases, but can get a bit complex for others. This is my only big hangup for non-hobby projects. This will improve with time, but it's very clunky for now.
* Types don't have to be specified, but I have tended to provide them for everything. I really like being able to do this, even coming from a Python background.
* The Dart IDE is surprisingly helpful. Debugging is decent, and they've stripped a ton of the bloat out from its Eclipse underpinnings. It does crash a bit on Arch Linux with the latest Oracle Java, though. That said, I hope they get in with the IDEA guys like they did for Android.
* My particular project uses WebGL, and I'm compiling to JS. I have yet to run into any complications with the conversion, and the generated JS has worked well on my two mid-range dev machines (Linux and Mac OS 10.9 on Chrome and Firefox).
* The error messages shown during interpretation/compiling are helpful most of the time, but can get a little more cryptic in certain cases (I've yet to find a pattern, but there probably is). I expect this to improve with time.
Overall, I have been very pleased with Dart, and like it (as a langauge) a lot better than CoffeeScript. Optional types has been my favorite feature, and I really like how "batteries included" Dart is. I'm a backend guy, so I don't have the drive or mental bandwidth to go looking at the various packaging/importing/testing/doc utils in JS land (although that is a perfectly viable approach if you have the time and experience).
The ecosystem obviously can't be compared to JS, since Dart is in its infancy. It'll be good enough for some usage cases, but you may find yourself re-inventing things for others (or shoe-horning things in via the JS interop). For hobby projects, Dart is going to get the nod over the alternatives (Typescript, CoffeeScript, pure JS) until it burns me.
I do like dart's clean DOM API though.
And of course Haxe also has its own platform, or can compile to native code... Just saying.
Of course Dart has Dartium, which could one day be the future...
Once again, I don't care. The OP was about a Dart release, and I was sharing my experience with Dart. Haxe doesn't interest me in the least, it's something entirely different for my usage case.
There are lots of intro pages out there to get you a little more familiar with it [0][1][2]. Dart as a language spec isn't all that deep, and it tries to keep things simple and easy to use. A lot of the power I feel like comes from the library and tools that come with the language.
[0] http://programming.oreilly.com/2013/05/dart-is-not-the-langu...
[1] https://www.dartlang.org/docs/dart-up-and-running/contents/c...
[2] http://en.wikipedia.org/wiki/Dart_(programming_language)
[0] https://www.dartlang.org/docs/spec/latest/dart-language-spec...
[1] https://code.google.com/p/dart/source/browse/trunk/dart/docs...
[2] http://news.dartlang.org/2014/02/standardizing-dart-1st-ecma...
[3] https://code.google.com/p/dart/issues/list?can=2&q=&sort=-st...
Note: Dart doesn't have generators, and Ecmascript is not planning on adding optional types.
I don't know Dart, but it looks as if you need a Google account to upload packages to that central package repo. Is that correct?
ActiveX was a way of loading untrusted binaries in-process with the browser and running them unsandboxed.
Does Dart run untrusted machine code unsandboxed? No.
If Dart is Google's ActiveX, then JavaScript is Netscape's ActiveX, Java is Sun's ActiveX and Emscripten is Mozilla's ActiveX. (Note: none of these is actually true)
Comparisons to Silverlight or Flash would also be inaccurate, since neither can compile to JavaScript and both are closed-source technologies that are not on any path to being standardized.
I'm just guessing. So far Dart2JS is pretty close to native Dart.
To be honest, I hope that Servo out-performs the current browser engines, and the that other browsers feel pressure to follow suit, because it will push the web forward as a whole. It's like SpiderMonkey and V8 did with JS performance five years ago.
Now you will probably say "but Dart is a new content type," and I see where you are coming from. But to me it's no different than asm.js. asm.js a new content type also, it just happens to be very clever and outputs programs which are a Polyglot (http://en.wikipedia.org/wiki/Polyglot_(computing)) of the new asm.js content type and regular JS. It is very cool how they have done this, but it doesn't change the fact that asm.js, when processed by an asm.js-aware compiler, is a different content type than regular JS and is processed in a different way that is intended to be faster than plain JS.
So to me, a putting Dart source file right next to Dart2JS output on the open web is no different than asm.js, and I think both are equally valid approaches to moving the web forward.
For more info see: http://sip.cs.princeton.edu/java-vs-activex.html
I, for one, don't. Better Javascript, with all its warts, than the W3C taking 10 years to create some standard language that was a comitee monstrocity (as they used to do a lot, until HTML5).
This is true only for very limited values of "everyone".
Only when that idea failed to gain traction did they turn it into a compile-to-js language...
Dart is a fine language. The main thing is has going against it is the feature widely referred to as "Is Not JavaScript". Thus, the Dart-to-JavaScript compiler.
This is my personal view and it may not be accurate: I don't think being open source or cross platform would have mattered to an average PC user back then. Windows held the dominance among PC users (>95%). It wasn't until the rise of firefox that people started noticing the benefits of open source and standards. ActiveX failed because it was way ahead of its time and that it wasn't sandboxed/virtualized making it a security blunder. The one click front door to your OS resulted in a flurry of exploits and viruses giving its bad rep as we know.
Dart is leading the same path but in a secure way. I think eventually we will end up there with Web Apps and its only a matter of who gets there first.