If you’re in the Flash space, you’ve probably seen a lot of coverage of HaXe lately. HaXe targets Flash 9 and 10, as well as JavaScript, PHP, NekoVM, and most recently C++. You can write code once and easily retarget it to different platforms, which is very exciting. This has been used to good effect by Hugh Sanderson, who is developing an iPhone path.
HaXe is cool not only for platform compatibility with things like the iPhone (and who knows – maybe other platforms like Android or Windows Mobile), but also for its language features. They deployed support for the new Flash 10 high-performance memory intrinsics before the official Adobe compiler. HaXe has generics/templates, decent conditional compilation, inlining, advanced typing a lot more. The biggest claim to fame HaXe has is a big performance margin over AS3, as well as better memory management options.
And performance is a big deal when you’re an interpreted language trying to run on Netbooks and televisions.
Since my day (and sometimes nights, too) job is working on a Flash game framework, HaXe looms large on my radar. AS3 and HaXe can already interoperate so if you want to use a HaXe physics library from your ActionScript 3 code, there’s no problem. But should we switch the core engine over? Having a seamless way to target iPhone would be big. Having an easy way to run your server code without requiring an integration with Tamarin would also be nice.
Ralph Hauwert over at unitzeroone summarizes the HaXe situation very well:
The language is great and has many features ActionScript lacks. It baffles me how one man army nicolas can single handedly write a language and a multi target compiler, and in many respects stay on top of the ActionScript compiler.
My first problem with Haxe is just that. The one man army. Should nicolas decide he doesn’t feel like it anymore, the platform is dead. Sure, there’s more people working on it, but in it’s core it seems to be that nicolas is the driving force. My second problem is that although there is a huge pool of ActionScript developers, which can work together within the industry standard called ActionScript. There’s not even near that many people who’ve even touched haxe, let alone the number of developers who are able to call themselves “Haxe Professionals”.
HaXe is very cool. But it doesn’t have the ecosystem and infrastructure to justify targeting it exclusively. As a small startup, we only get to target one platform for our technology, and AS3, although it leaves performance on the table, wins in terms of the pool of potential developers and the accessibility of the toolchain. How many people out there are using PHP or Java vs. x86 assembly?
If the basic technology is good enough, ease of use always wins out over performance. So for now we are going to stick with ActionScript 3 for PushButton Engine. You can write compelling content on it. If you really need HaXe for something, the option is there to link it in.
But I want to put the plea out to Adobe. I love you guys and all you have done in the Flash space. But please update your compiler technology. At least give us the compiler optimization wins like inlining and generics. It’s simply embarassing that one guy’s work can outperform you on your own VM!
Adobe, you have smart people working for you. You have smart people in your community. You have pretty decent tools. None of us want to jump over to a third-party technology, but if HaXe keeps beating you at your own game, it might be necessary. Buy HaXe if you must, or else match it with your in-house tech, but either way – I know you can solve this problem.
The web is catching up with you on the player front. You could dominate on the tools front and make the world better for everyone. Please. As a middleware developer, I really don’t want to have to support anything other than a single mainstream language and platform. ๐
I've switched to HaXe one year ago and I don't regret it! It's stable, it's production proof (used it in a couple of commercial games), the language is simple, fast and updated often. My only concern is the poor documentation and the lack of a (really) good IDE. Also AS3 <-> HaXe interoperability works fine, my co-workers actually use HaXe SWC files in their AS3 projects.
There's a few small differences that mean that you can't really just convert AS3 to haXe, but you can convert haXe to AS3! The main thing is that you can use any code written in haXe in AS3 anyway, so why not make your library in haXe, especially if you're making something that people just hook into.We've been using haXe for over 6 months now and can't believe we hadn't been using it for years! It's amazing, for Flash, PHP and Javascript dev.
@ Miami web designer, I would like to install this and try it out too. Let me know how it goes for you. This sounds good to me.
Haxe is very good for the iphones
my inernet not working properly I have bookmarked ur story i'll read it latterHave a nice daykatiz slop______________________________________________Sonoma Bed and Breakfast | toronto furnished apartment | anti snoring mouthpiece
I would like to try HaXe and I think it can help me with my project proposal. I would to know how to install this?
HaXe have only great language features.. I think C# is the best of them..
I wonder if HaXe guy isn't sterested in making kind of a AS3 compilersomething that simply get my AS3 code and makes it faster.that way we can get more performance without having to learn yet another language. (nothing against haXe but 2 different languages in 1 single project is not what i want)
Personally, I would prefer C# among the three of them. It has the biggest dev community and the best tools. It is the most mature.AS3 is doing ok, but has some growing up to do. HaXe has poor tool support and weird syntax, but great language features.
Flash has nothing to fear from Silverlight, because the flash toolchain can run under Linux, but would there even be mxmlc for Linux without Haxe? Doubt it. Haxe is actually a much simpler language than AS3. C# is just silly.
You have a typo in your HTML code: advanced typing a lot more. The biggest claim to fame HaXe has is a big performance margin over AS3
Adobe could do a lot worse than integrating Mono and supporting C# in the player.But the main benefits of integrating Haxe (better performance, compile to other targets) do not require any changes to AS3. Of course HaXE itself has lots of nice new language features, but most of its wins are independent of those.
I have some suspicion that Adobe is very, very afraid to make AS3 more complex than it is now. The more complex AS3 becomes, it will become more similar to C#. And why I think Flash is still the choice even though there is Silverlight, is because the programming language is much more friendly to developers without computer science degree or those geeks.
Nice to see you giving haXe some love Ben. I knew you would come around ๐ Of course, you have completely valid concerns about it… especially, from a technology provider's viewpoint.
I think having versions of Flash CS and Flash Builder that could target a variety of platforms would be very exciting, and motivate more sales of their tools.They're not making any money off the player or the SDK. But allowing the toolchain to be leveraged in more places seems like a brilliant way to grow sales.
I have been developing Flash games in haXe since mid-2007. It is a very strong language and compiler, but I think Adobe will opt to ignore it because of a conflict with their business goals; if it is easy for a developer to compile on both Flash and other platforms, the monopoly on the Flash toolchain is weakened. Adobe has historically stayed just open enough to retain its market share, albeit the more powerful and influential the Flash platform becomes, the more likely it is that strong open-source competition will appear. Nobody was going to spend that effort when all Flash did was play video and animations, but now that it's trying to be a serious application platform, the motivations are all different.