darthaxe

Dart vs Haxe - Current state, hype, usability, ...?


Recently I've been looking for new (al least for me new) ways to make web apps. And I found two languages that seems very promising. Google Dart and Haxe. Both can compile to javascript, so they should both work on all browsers.

Now, my question is, to those who worked with either or both, what's the state of them. Are they used a lot? Are they usable? What's the community of them? Which one is best, or shows most promise according to you? And most importantly, what's the state of both, are they still actively developed, and which one do you think will survive the longest?

(Edit: as a bonus, I'm planning on making a little game in it, probably using the html5 canvas, so which one has best support for this?)


Solution

  • I'm the opposite of Eric J. Smith - I can only speak for Haxe.

    Haxe is definitely a great language already. I'd say most of its big commercial usage is in the games industry - being able to compile the same code base to Flash, JavaScript, Desktop, iPhone, Android, WebOS and BlackBerry really is pretty impressive :) As an example, see some of the games that were created using Haxe in the last Ludum Dare 48hr game making competition - some of them even have source code on GitHub.

    If you're going after games in Haxe, there's a few options. The most popular seems to use OpenFL, a library on top of Haxe that gives you a Flash/AS3 like API that compiles out to many targets. It does output to JavaScript, but it's main focus is Flash and Native CPP (for iPhone etc) - because the performance is so much better than JavaScript. You can also work with frameworks specifically targetting JavaScript, such as CreateJS. I've also heard good things about Flambe which seems to be optimised for JavaScript games / interactive graphics.

    (Side note: it's pretty easy for Haxe to create 'externs', so many normal JavaScript libraries can be used without too much trouble in Haxe)

    For app development (not games), Haxe can still be good - this is more of what I do. I generally use pretty standard JS technologies like jQuery, but Haxe gives a whole bunch of nice extras with compile time error-checking, a really powerful language and the ability to share code with the server. I'm sure Dart provides some of the same advantages.

    In terms of maturity, stability and support:

    I would also love to hear from people who have used both as to differences in the actual languages. From what I've picked up Haxe seems to be more strictly typed (which I prefer - catch more errors at compile time!) but some people don't like that.