
Haxe: Cross-Platform Development's Best-Kept Secret - kevin_bloch
https://www.toptal.com/cross-platform/haxe-language-cross-platform
======
cojo
We used Haxe for a while at my last company for a cross-platform engine that
would actually run well on web (browsers couldn't yet handle "real" Unity
WebGL builds at that time).

While it "worked" and the resulting engine / suite of games ended up net
profitable, and I'm a fan of Haxe's features as a language (I am really
missing the pattern matching and macros in Typescript these days), I must say
the build pipeline and available tools for OpenFL / Haxe games was lacking at
best.

On the plus side being able to fork and fix issues we ran into was a game
changer over Unity IMO.

Not sure if the ecosystem has evolved / improved on the build and tooling
fronts in the last 18 months since I last interacted with it directly, but
that would be the one word of caution I'd offer to anyone after they read this
article. Be prepared to roll up your sleeves and get a little dirtier than
usual if you really intend to ship on both web and mobile.

~~~
larsiusprime
OpenFL's matured a bit since then and I quite like it personally, though I
should point out that OpenFL is simply one of many libraries, and the rest are
worth checking out, too! OpenFL's probably the most well known but the
ecosystem has a lot to offer beyond that.

------
dgreensp
The biggest thing that interests me about Haxe is it is rare to find a high-
level language with a sophisticated static type system and familiar syntax.
This is why TypeScript is so much beloved, but Haxe has some awesome features
TypeScript lacks, like a pattern-matching switch statement (with guards), and
array comprehensions.

~~~
Drakim
And don't forget the macro preprocessor, it's made life a lot easier for me in
so many ways. Syntax sugar, automatic asset inclusion, compiling tasks, and
much more.

------
badsectoracula
I used Haxe years ago to make Flash games and tech demos [1] (probably only
works with Chrome these days). At the time it was the only free way to create
Flash games (at least using an actual programming language) but even when
Adobe released some free tools, Haxe was still not only much faster as a
compiler but it both produced faster code _and_ provided tools for making
things fast (e.g. `inline` wasn't just a hint, if the compiler couldn't inline
a function it would error out - and inlining made a difference at the time).

Eventually i lost interest in Flash and moved on to other things. I thought
about using Haxe for making HTML5 games (when those were new), but unlike
Flash gaming that was huge, HTML5 gaming never took off and was almost
entirely about mobile games that i never cared much about. Also Haxe's
JavaScript output at the time had some significant overhead that i found it
simpler to just write JS directly.

I've been subscribed to the Haxe mailing list for the last 10 or so years,
mainly to take a peek at what is going on and sometimes try a new version
(sadly it seems Haxe is sometimes breaking backwards compatibility and often
found the code needing changes), but that ended recently with the mailing list
shutting down. Since then i had no other contact with the language at all.

Although sometimes i see people writing "one-to-many" transpilers, thinking
that this is a neat new idea, while i'm in my corner muttering something along
the lines "Haxe did that a decade ago" :-P.

[1]
[http://runtimeterror.com/tech/demo/flashdemos.html](http://runtimeterror.com/tech/demo/flashdemos.html)

~~~
jdonaldson
The mailing list has been decommissioned in favor of the Haxe community site :
[https://community.haxe.org/](https://community.haxe.org/)

------
jadbox
I've been using Haxe over a decade, and it's really a shame it doesn't get
more attention. The language is amazingly productive for game development,
although lacking the GUI tools of Unity.

------
thosakwe
It might be time to try Haxe. I’ve always wondered why it doesn’t get a lot of
buzz around it. It seems like a genuinely good way to achieve “write once, run
anywhere.”

It’s always interesting how the chicken-and-egg problem applies to programming
languages.

~~~
giancarlostoro
Its a nice language though some of the output is weird. Like I did a PHP
target as a test and I think I did a print statement and it added a lot of
code in there when i was expecting a simple echo or something. So it can have
its downsides depending on what you do. Definitely curious where it stands for
Mobile though.

~~~
kevin_bloch
I wonder, did you have the "dead code elimination" feature enabled? (Just
throwing it out there. I haven't tried transpiling to PHP with it myself. :) )

~~~
giancarlostoro
Not sure, this was many years back but if it wasn't a default it's very likely
I didn't.

------
heckanoobs
I used Haxe and NME years ago to build an Ouya (RIP) game. I was coming from
actionscript and it was a delightful language. Glad to see it's still
evolving. That game project was a blur of haxe, java, and c++ due to Ouya's
infancy and haxe could handle it all. I was impressed

------
danbolt
Popular Ludum Dare contestant 01010111 has made some slick 48-hour games in
Haxe.[1] Even winning the compo once too.

From what I've seen Haxe has a lot of great features for individual game
developers to be expressive.

[1]
[http://ludumdare.com/compo/author/01010111/](http://ludumdare.com/compo/author/01010111/)

------
disqard
I'd like to chime in and add that I've had to rebuild an entire Visual
Programming Language (think Scratch, but free of text) to migrate away from
Flash. I picked Haxe, and it has been a solid language+compiler for what I
needed (transpile to JS, and now my code runs on any modern browser).

------
canada_dry
Like I did a few years ago, I quickly browsed through some of the sites and
didn't find solid quick start stuff needed to get me (a haxe noob) to go
further.

For a 'mature' platform looking to get more attention I would have liked an
easy step-by-step demo 'hello world' for a haxe -> android target.

But, I couldn't even find much in the way of haxe-for-dummies that
specifically address the android target.

~~~
madmulita
Oh, but, if you have wine or some virtualization software you can run quickly
get started using 'haxedevelop'...

I guess it's not that multi-platform, after all.

~~~
cmandlbaur
Sure, or vscode, vim, IntelliJ, sublime. There are a ton of options.

------
stewbrew
Is haxe used for anything other than games? The userbase seems to have a focus
on flash, games etc.

~~~
joneil
I’ve used it for web (my failed startup was in Haxe, my side projects still
are mostly Haxe).

To be honest these days I mostly just use it as a “better JavaScript” because
I’d prefer my backend to be NodeJS rather than PHP or Java or sone other Haxe
target. But I really do prefer it to JavaScript, even with Babel and Flow and
ES6 and all the things to modernise Js.

~~~
disqard
Same here. It's a "better Javascript" for me as well. My constraints force me
to use JS for what I'm building, and Haxe does a great job of insulating me
from having to write and maintain a large codebase in JS.

------
cmandlbaur
Been using Haxe for a webgame project and thus far have been blown away by the
functionality and features available as well as the community.

------
pier25
The language is awesome, heavily inspired by EcmaScript4 / ActionScript3.

------
shmerl
Amanita Design should have used Haxe instead of dead Adobe Air for their
games.

