Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart vs Haxe - Current state, hype, usability, ...? [closed]

Tags:

dart

haxe

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?)

Thanks a lot!

-Pablo

like image 213
The Oddler Avatar asked Sep 05 '12 21:09

The Oddler


2 Answers

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 NME, 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 - here's a blog post comparing NME to CreateJS for Haxe. 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:

  • Haxe has been around a lot longer, and though it's development team is smaller, they're super committed (check out how many changes are being committed).
  • Dart has a much bigger company backing it. For Haxe an official foundation is being set up to promote Haxe's future - but they won't have the same kind of money as Google! Ultimately, if Dart ever really takes off - I predict someone will set up Haxe to output to Dart soon enough - just like they have with NodeJS on the server :)
  • Both seem to have super committed communities
  • Many of the libraries that are available for Haxe seem to be game related - lots of tweening, animation, physics etc. Not sure how Dart goes here.

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.

like image 102
Jason O'Neil Avatar answered Sep 30 '22 01:09

Jason O'Neil


I can only speak for Dart. I think it is already an awesome platform and it is just getting started. Google is investing VERY heavily in Dart and Im very confident that its going to be an incredible platform. My son and I are building a client / server game using canvas and doing both sides in Dart. So far it has been a really good experience! They have an editor with full code completion, navigation and refactoring support and its getting better on a daily basis. Its a lot of fun to update the editor every day as they add new features and get to play with the new toys! There are quite a few people doing canvas game projects on it and having good success. The only downside is that the project is still really young and doesnt have a lot of 3rd party libraries just yet, but new ones are popping up every day.

like image 35
Eric J. Smith Avatar answered Sep 30 '22 00:09

Eric J. Smith