6 ms·
I've been working on a Dart project (http://frontiermap.s3-website-us-east-1.amazonaws.com/ http://frontiermap.s3-website-us-east-1.amazonaws.com/) with StageXL
by gtaylor 13y ago
I've been working on a Dart project (http://frontiermap.s3-website-us-east-1.amazonaws.com/ http://frontiermap.s3-website-us-east-1.amazonaws.com/) with StageXL, a Dart transcription of ActionScript's library: http://www.stagexl.org/ http://www.stagexl.org/
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.
- greggman 13y agoWhat if anything makes Dart better than say ES6 or ES7 or whatever version of JavaScript that adds optional types, generators, etc...
- WoodenChair 13y agoThe designers got to mostly start from scratch (some things are there for JS compatibility) not only at the language level, but importantly also at the VM level. It's already ~ 2X faster than V8 and they believe there is room for more performance gains. Then add in all of the nice language features beyond classes and types and you have something worthwhile.
- deleted 13y ago[deleted]
- kyrra 13y agoDart is usable now. ES6 has long been delayed, and who knows when ES7 will be available for mass usage. 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-language-you-think-it-is.html http://programming.oreilly.com/2013/05/dart-is-not-the-langu... [1] https://www.dartlang.org/docs/dart-up-and-running/contents/ch01.html https://www.dartlang.org/docs/dart-up-and-running/contents/c... [2] http://en.wikipedia.org/wiki/Dart_(programming_language) http://en.wikipedia.org/wiki/Dart_(programming_language)
- kyrra 13y agoTo add a few more useful links. Language spec[0][1] is available under a free license and they welcome input on it[2]. The 3 top starred bugs in their bugtracker are: enums, non-nullable types, and "await" support [3], though I don't expect non-nullable types to ever be added, but they like hearing what is important to programmers. If there is really a killer language feature that people want, starring it will increase it's chances of being considered. [0] https://www.dartlang.org/docs/spec/latest/dart-language-specification.html https://www.dartlang.org/docs/spec/latest/dart-language-spec... [1] https://code.google.com/p/dart/source/browse/trunk/dart/docs/language/dartLangSpec.tex https://code.google.com/p/dart/source/browse/trunk/dart/docs... [2] http://news.dartlang.org/2014/02/standardizing-dart-1st-ecma-tc52.html http://news.dartlang.org/2014/02/standardizing-dart-1st-ecma... [3] https://code.google.com/p/dart/issues/list?can=2&q=&sort=-stars&colspec=ID%20Type%20Status%20Priority%20Area%20Milestone%20Owner%20Summary%20Modified%20Stars https://code.google.com/p/dart/issues/list?can=2&q=&sort=-st...