Hacker News new | past | comments | ask | show | jobs | submit login


* The Haxe C++ output is very solid. Sometimes there are compiler errors that you have to reverse engineer, like for when you use a try{} without a catch{}, which is valid in Haxe, but throws an error in C++. It's relatively easy though; the C++ output contains which haxe file and line number each line is from, and it has never taken more than a minute or two to figure out what's going on.

There has only been one logic error I've experienced - Haxe guarantees that arugments of a function are called left to right (i.e. something( readbyte(), readbyte() );), but of course C++ does not. Other than that, as far as the core compiler and code generation goes, if it compiles, the generated code is sound.

* Use NekoNME - bootstrapping on the iPhone without it would require a whole bunch of work. It is an API compatibility layer with Flash, and most basic stuff is replicated. So you code against the Flash APIs, and it spits out a native app on the iPhone, etc. That said, call as few of the Flash APIs as possible; roll stuff by hand, because they kind of suck.

* The garbage collector is quite slow, especially on the iPhone. So you have to be careful about the number of objects you've got in flight, even/especially strings. I don't keep Black Market's story in memory even on the PC version of the game because of this.

* The C++ generated code is very very fast. Though of course some optimisations aren't possible, like creating vectors on the stack, so for example the Haxe Box2d port is slower than the original C++ version of Box2D (I had to use pooled Vectors in Super Goblin).

* If you're making something using 2D graphics, catering to the myriad of display resolutions is going to suck. But that's not a function of Haxe.

* Similarly, you end up doing a whole bunch of work per platform anyway; stuff like putting in app purchasing into the iPhone apps required (at least when I did it) hacking it into the native sections of the NME libraries (a pain, but doable).

* Checkout NME once, and stop updating when it's working well - it breaks often, and is in constant development.

* That said, if you're a hacker, get commit access to NekoNME. If you commit solid changes back they'll love the extra help, and you're likely to want to add some missing features (not as many these days as there were when I did it a year ago).

Now that Unity3D supports Flash, my next game is actually going to be written in that (see http://www.underthegarden.com). However, if Haxe fits your needs (eg write your website backend, Javascript, SWF, iPhone app, PC downloadable all from the same codebase), it's solid and will likely be around for a long time; there'll be some teething pain, but it isn't a lemon technology wise.

The reason I suggested people email me is so I can help figure out if it actually does fit their use case!

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact