
Haxe 3 Released - raphinou
http://haxe.org/download
======
dsirijus
I've been haxing for some time now, and I know of at least one startup that
uses/used it (Profitably).

In short, Haxe can produce swf and neko binaries and C++, C#, JS, Java and PHP
source.

Language itself is, for my humble old school OOP taste, really well done and
compiler is _blazing fast_. So fast that people now implement real-time error
checking by simply compiling project (with few additional flags).

Real perk here for me (a game dev) is not so much Haxe as libraries for cross-
platform development, namely NME, which appears to have some restructuring
going on right about now [1]. It is SDL-based haxe library that's really the
one powering cross-platform game deployment. And it's pretty great at that,
but a bit unstable. The goals outlined in the video linked should get that on
the right track.

Of other interesting things, 2d physics engine named nape [2] comes to mind.
It blows Box2d out of the water in oh-so-many aspects, particular ones being
memory and framerate stability.

[1] <http://vimeo.com/66996045>

[2] <http://napephys.com>

Edit: ...and it has absolutely amazing community of doers!

~~~
azakai
> In short, Haxe can produce swf and neko binaries and C++, C#, JS, Java and
> PHP source. [..] Of other interesting things, 2d physics engine named nape

If Haxe can compile into JS, it would be cool to have online demos of things
like nape (their site requires flash when you click play, not sure if that is
to run flash or show a video).

Are there are online demos showing an interesting Haxe project compiled into
JS?

------
evincarofautumn
Haxe is pretty cool from a language standpoint. It’s certainly an improvement
in some areas on its closest relative, ActionScript 3. Particularly “enums”[1]
(ADTs) are excellent to have, as I’ve been spoiled by them in Haskell, as well
as proper generics, “switch” as an expression, and other such goodies. Bit of
a shame that they kept the fat old “function” keyword, though. The type
inference system is also a bit lacking—I don’t like how it can depend on
control-flow order whether you get a type error or not[2].

I recall that the compiler would often produce different behaviour on
different backends, including crashes. Presumably this has been addressed in
recent versions? It’s one of the reasons we chose AS3 when developing
Spaceport[3] and stuck to matching Flash behaviour as closely as possible.

[1]: <http://haxe.org/ref/enums>

[2]: <http://haxe.org/ref/type_infer>

[3]: <http://spaceport.io/>

~~~
novalis
I don't see how type inference in Haxe is worst than AS3 type inference. Think
it stands on its own on that particular point.

I also never had a crash with something out of the running service compiler,
even earlier since I started using it at 2.x, you probably evaluated it in a
1.x version ? You talk of enums but that was at the top of the "pros" around
4/5 years ago.

Leaving AS3 and being able to target all the systems I want to target, was the
reason Haxe became valuable to me. So that "reasons we chose AS when
developing Spaceport" is sort of telling about Spaceport and nothing else. It
isn't an option for everybody, really. You can build all sorts of projects on
it, from a server daemon, to a casual game on mobile through the usage of Haxe
NME / openFL. Things have moved on, so to say.

~~~
lucian1900
It's rather bad compared to Haskell or (Oca)ml, in fact it's bad even compared
to Scala.

------
csense
This was once on my list of things to learn, because every time I looked at
Flash, I saw that Adobe wanted a three-or four-figure sum for the proprietary
toolchain, and the open-source toolchain was very poorly documented (and what
little documentation existed seemed to expect you to know the terminology and
workflow of the proprietary toolchain).

Imagine a world where gcc is the only open-source C compiler, and gcc required
you to run preprocessor, compiler, assembler and linker directly, manually,
and you had never used any compiled language before, and the gcc docs assumed
you know which of these programs you needed to run, and in what order, to
compile your programs, and these components were each separate downloads
written by different people and offered for download alongside all the
individual tools in the binutils suite. So you have no clue which of the
dozens of tools you actually need, in what order you need to run them, you've
also never written in any language but Python and Javascript before, and the
things you need to do to get programs to run in those languages is nothing
like what C wants, and none of the information you lack appears to be written
down anywhere that your very best Google efforts can find.

In this world, of course you can pay Microsoft $300 for a C compiler with an
IDE which takes care of everything for you, and a lot of people swear by C and
do amazing things with it, but really you don't want to spend that kind of
money for a tool you know nothing about, and so you just sort-of limp along
with Python and Coffeescript, and miss out on the C world entirely.

That's the situation Flash development was in before Haxe came along.

Of course, now you can use HTML 5 canvas for stuff that previously required
Flash, so Flash is kind of obsolete.

~~~
dougk16
FlashDevelop is (and has been for 3 years at least) a very solid and easy-to-
pick-up way to develop Flash/AIR applications without having to touch anything
proprietary AFAIK, except the runtime of course. The SDK might technically be
proprietary in some sense, but is open source and managed by Apache
(<http://en.wikipedia.org/wiki/Apache_Flex>). Overall, you don't need to
purchase anything, and the free workflow is IMO even better than those you
have to purchase, including FlashBuilder and FlashCSx.

FlashDevelop is also a great IDE for Haxe development, so overall, I'd say put
these back on your list to learn. :-)

I think Flash still has some life left in its newer form of AIR for mobile.
Having done a lot of HTML5 stuff the past year, I do miss the relative
simplicity of it, not having too many cross-browser headaches. Going to try
the Haxe->HTML5 workflow soon and see how that works out.

~~~
csense
> for 3 years at least

I think I researched the state of Flash for developers about 2000, and again
about 2005, and last looked at it around 2008 or 2009. Haxe was just getting
started the last time I looked at it, and I've heard it mentioned a couple
places since then. Anything that's happened in Flash development-land in the
last three years isn't on my radar.

Really, my early ventures into Flash-land were so discouraging, and in more
recent years the advent of HTML5 was so encouraging, that Flash may end up
permanently relegated to my low-priority pile of things like Lisp, Prolog,
Haskell and Unity, things I want to look into again when I have mountains of
free time and/or money to spend on extremely unfamiliar things, which might
possibly give me interesting new capabilities, but for which an initial cost-
benefit analysis has ended in pointed, skeptical questions that I can't answer
very well.

------
thorum
New features: <http://haxe.org/manual/haxe3/features>

------
seivan
I've heard great things about Haxe for game development. Apparently it beats
the crap out of Flash for portability when target desktop and mobile.

------
sbarre
Is something like Haxe really that in demand?

I haven't heard of Haxe much (the last time was probably on here) but in
theory it seems like a great idea.

I wonder why it's not more popular?

~~~
thorum
I personally wouldn't do any medium-to-large JavaScript project in anything
but Haxe at this point.

> I wonder why it's not more popular?

It's a relatively young language (8 years old, but it's only been mature for a
fraction of that). I think it just hasn't reached critical mass yet.

~~~
sbarre
Very interesting.. I hadn't thought of this particular use-case (targeting
Javascript)...

You've had good success with cross-browser issues?

~~~
seabrookmx
HaxeJS comes with a built in JQuery extern, so you can basically make a page
the same way you would with a JS/JQuery frontend, but you get the language
feature and type checking benefits of Haxe.

JQuery should handle all your front-end cross-browser issues.

Also, you can do your backend in Haxe, and target the NekoVM (via mod_neko
(single thread per request) or mod_tora (multi-threaded) for Apache) or
NodeJS. Haxe could do this long before Dart showed up.

------
kelvin0
to make desktop/www apps in one go. However, I have not found one single
complete UI solution that is completely cross platform for Haxe. It seems to
me that it's a write-once runs everywhere BUT has librairies which are target
specific (for GUI at least).

Correct me if I'm wrong because I would love to start developing on Haxe ...
until I have a proper GUI lib\framework.

~~~
kelvin0
Let me correct my last post: I recently installed this in order to make
desktop/www apps in one go (Haxe=>Desktopa and WWW). But I have not found any
GUI Libs that are multitarget (CPP, www, IOS) etc.. Please correct me if I'm
wrong I'd love to use this otherwise

~~~
dsirijus
This works rather well <https://github.com/RealyUniqueName/StablexUI>

But we're all pretty much _roll your own_.

------
thrownaways
Slightly off topic. Not sure your affiliation or if someone from the project
will read comments.

On the front page, if the designer could line the letters up with the bezels,
I think it would look a little better. Only have Paint on this machine but:
<http://imgur.com/uYYV8Qt>

~~~
oblique63
I believe that 'misalignment' was intentional to preserve the illusion of
depth between the placement of the devices. And while I agree that it's a tiny
bit harder to read, lining the text up would just ruin the image for me; in
fact, I think the text is too aligned _as it is_ to make it work in that
context. If readability for that headline is a prime concern, I would just go
with another image/presentation entirely.

Pedantic, I know... lol

------
notjustanymike
As a front end developer doing a lot of UI work in AngularJS, where does Haxe
fit for me?

~~~
btipling
Haxe "compiles" to JavaScript. So I imagine it may be suitable as a
replacement for JavaScript if you wanted such a thing.

~~~
city41
Using a program to convert from one language to another is "compiling". The
recent backlash against the notion that Haxe, CoffeeScript, etc compile to
JavaScript is annoying. The act of compiling does not require going to an
object code based language.

~~~
rys
Agreed, plus we also have a better word than compile for source-to-source
compilation at the same conceptual level of abstraction above the machine:
transpile.

------
MrBra
one humble question: why is not popular?

------
NKCSS
I must say that the site is pretty misleading with having a MacBook Air and
iPhone in the mix there, since it cannot compile to Objective C...

~~~
ZenoArrow
Is that so? <http://www.nme.io/>

Aside from that, is Objective-C even a requirement for OSX/iOS development?
Vanilla C should work too, as Objective-C is a superset of C89.

