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

2

20

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

Dalessandro answered 5/9, 2012 at 21:9 Comment(1)
whoever closed this question didn't exercise good judgement.Uraemia
U
42

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:

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

Ustkamenogorsk answered 7/9, 2012 at 6:17 Comment(3)
For Canvas games I'd suggest to look into Flambe, a Haxe library designed for performance.Uneducated
Yes good point - from the demos I've seen it looks quite smooth, though I haven't tried it yet myself...Dennadennard
I consider smaller development team a big plus for a language.Labile
S
11

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.

Sessile answered 6/9, 2012 at 0:55 Comment(5)
It is very good to hear it is very activly being developed. I was already excited about it and this just adds to that. Also cool to hear that you are making a multiplayer game, is networking a buildin feature or a separate library? Thanks for this answer, definitely going to check out Dart now :P Oh yes, how's the community?Dalessandro
@Eric J. Smith is your game opensource and the sourcecode somewhere online? github?Shahaptian
Yes, my project is here: github.com/ejsmith/DartGame It's definitely a work in progress, but it has been a fun project.Sessile
@TheOddler The community is very active. There is a forum here: groups.google.com/a/dartlang.org/forum/#!forum/misc There are also a lot of blog posts, videos, tweets and things posted on G+. The main website does a good job of keeping all of the info organized: dartlang.org/communitySessile
Nice, thanks for all the info. Very excited about Dart now :DDalessandro

© 2022 - 2024 — McMap. All rights reserved.