News for hackers. Stuff that matters.
Re:Dart Lang 1.2 Released by gtaylor on Wednesday February 26, 2014 @03:54PM (#7307711)
I've been working on a Dart project (http://frontiermap.s3-website-us-east-1.amazonaws.com/) with StageXL, a Dart transcription of ActionScript's library: 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.

Re:Dart Lang 1.2 Released by nailer on Wednesday February 26, 2014 @05:27PM (#7308569)
Have you used typescript to compare? It adds optional types and class based OO and that's it. It's used for large chunks of Windows 8, eg, xbox music is 100Kloc of typescript.

I do like dart's clean DOM API though.

Re:Dart Lang 1.2 Released by gtaylor on Wednesday February 26, 2014 @07:53PM (#7309497)
I haven't, but if it has most of the things I mentioned as things I liked, it'd likely be a capable substitution (for me). Dart is good enough for me, though. I really like their approach as a whole.
Re:Dart Lang 1.2 Released by fidotron on Wednesday February 26, 2014 @05:46PM (#7308724)
To be honest, if XBox Music needs to be implemented in 100k lines of a very high level language there's something very wrong going on.
Re:Dart Lang 1.2 Released by kevingadd on Wednesday February 26, 2014 @07:38PM (#7309418)
You clearly don't know how complicated a music player + music store + music library manager can get. There's a bunch of stuff going on there between music codecs, library management, streaming music downloads, pulling id3/etc tags down from db servers, copying music to mobile devices, managing playlists...
Re:Dart Lang 1.2 Released by fidotron on Wednesday February 26, 2014 @07:39PM (#7309428)
I've written game delivery systems which were smaller, like 1/20th of the size.

You aren't exactly going to be writing the CODECs and DRM for XBox Music in TypeScript are you?

Re:Dart Lang 1.2 Released by particlewave on Wednesday February 26, 2014 @07:59PM (#7309524)
Using it successfully on large team. Works great and plays well with all the existing JS libraries.
Re:Dart Lang 1.2 Released by Mikeb85 on Thursday February 27, 2014 @04:50AM (#7311290)
Haxe has all your pros and more... Static typing with type inference, OO, good tooling, good libraries, has JS externs for most big libraries and easy JS interoperability, IDEs with good tools (including a fantastic VIM plugin called Vaxe), etc...

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...

Re:Dart Lang 1.2 Released by gtaylor on Thursday February 27, 2014 @10:43AM (#7312739)
> Haxe has all your pros and more...

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.

Re:Dart Lang 1.2 Released by greggman on Wednesday February 26, 2014 @05:22PM (#7308528)
What if anything makes Dart better than say ES6 or ES7 or whatever version of JavaScript that adds optional types, generators, etc...
Re:Dart Lang 1.2 Released by kyrra on Wednesday February 26, 2014 @05:53PM (#7308782)
Dart 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-langu...

[1] https://www.dartlang.org/docs/dart-up-and-running/contents/c...

[2] http://en.wikipedia.org/wiki/Dart_(programming_language)

Re:Dart Lang 1.2 Released by kyrra on Wednesday February 26, 2014 @06:40PM (#7309113)
To 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-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...

Re:Dart Lang 1.2 Released by gtaylor on Wednesday February 26, 2014 @06:38PM (#7309094)
I don't really care about ES6 or ES7. The point of my comment wasn't to compare anything. I (subjectively) liked working with Dart. I did like the "batteries included" approach of Dart vs JS, but that's not really a language think so much as it is an ecosystem/leadership difference.
Re:Dart Lang 1.2 Released by xxgreg on Wednesday February 26, 2014 @05:56PM (#7308812)
The best bit about Dart is not new features, but many of the footguns that have been removed compared to JS.

Note: Dart doesn't have generators, and Ecmascript is not planning on adding optional types.

Re:Dart Lang 1.2 Released by WoodenChair on Wednesday February 26, 2014 @05:51PM (#7308761)
The 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.
Re:Dart Lang 1.2 Released by sfjailbird on Thursday February 27, 2014 @04:22AM (#7311214)
GWT is still a very good alternative if you are a Java shop.