May 2021
Mo Tu We Th Fr Sa Su
<< >>


Haxe 2.10 RC

Posted on Jun 22 2012

Today we're making available for testing the Haxe 2.10 Release Candidate.

At first, 2.09 was supposed to be the last 2.x so we can focus on 3.0, but we got so many nice things that we decided to make a mid-term release, still keeping best compatibility with 2.x, and allowing you also to enable some of the Haxe3 changes by adding a simple -D haxe3 to your compilation parameters.

Here's a very short list of the main things we got in 2.10 :

  • Java and C# targets ! compile with -java or -cs to output Java or C# source code ! Big thanks to Cauê Waneck which is working on this. It's still in beta, should be a lot better for 3.0, but you can already play with it, report bugs and improvements.
  • Reduced JS output : we worked a lot so that --dead-code-elimination really eliminates a lot of standard Haxe things from the output. As you can see on, a simple Hello Haxe example will be reduced to only 7 lines of JS. We will still activate great features such as reflection, but only when you start using the corresponding API calls (such as Type.getClassName for instance)
  • Smarter Type inference : Haxe type inference got several levels smarter. It can now correctly infers the "minimal type" for constructs using multiple values such as constant arrays / switch / etc. , it can auto detects the expected enum in many cases, enabling you to use the constructor without the need to import it, it can now also do subtyping and variance on constant structures and arrays.
  • Macros reification : Haxe macros have been available since early 2011, leading to many successful usages. However it is often hard to manipulate AST enums by hand. With the addition of reification, macros just became much more accessible / usable.
  • A Haxe/C++ Debugger is on the way ! You should soon be able to debug your code interactively whatever the platform you target.
  • Languages improvements : we also made several small language improvements, which together makes Haxe a lot better :
    • allow direct initialization of properties and member variables
    • using now imply import as well
    • sub classes can now widen method visibility
    • overriden methods can now be covariant wrt to the original definition
    • allows callback(foo,_,0) notation instead of function(x) return foo(x,0)
    • local named functions can now have type parameters and be declared as inline
    • type constraints are now supported on function and methods type parameters
    • improved @:overload so it can now use type parameters
  • and of course, the usual minor improvements, bug fixes, optimizations, etc.

Big thanks to the whole compiler team, and in particular to Simon Krajewski which have been of a great help with the compiler internals since he joined us.

You can download Haxe 2.10 Release Candidate on, please don't use the automatic installer (or use the r4946 Windows installer here).

We need your help to test this RC and make sure everything is fine for a proper 2.10 release, which should happen in around two weeks, please report any bugs or regression issues that you might have by posting on the Haxe Group

Enjoy !

  • Jun 22, 2012 at 21:39

    Intéressant, j'ai installer la nouvelle version faut dire que j'ai quelque problème. Je vais essayer de les mettre sur le Google Group. J'ai hate pour la version 3 !

  • Jun 22, 2012 at 21:59

    Waw. Waw. Waw.
    I'm always really impressed by all the work that is done for Haxe : congratulations to all the Haxe team !
    I've been expecting all these new features for days (I check Haxe version everyday :D) and I think I'll not be disappointed.
    Good work.

  • Shalmu
    Jun 25, 2012 at 10:39

    Great! One thing: Smarter Type inference - can you provide us with a simple example? Because in my opinion, it could not be smarter before and I don't get how could it become even smarter :)

  • Jun 28, 2012 at 11:14

    Amazing, Keep up the good work !!!

  • Jun 28, 2012 at 19:56

    Very nice!
    Haxe being the online live project around, you are the real developers.

  • Jun 30, 2012 at 21:31

    An example of smarter type inference :

    var x : Array<{ x : Float, ?y : Int }> = [{ x : 1 }];

    It is now possible for the compiler to use the expected type to ensure that the value match it.

  • Jun 30, 2012 at 22:27

    Great work so far! The new type inference is pretty hawt... not to mention adding C# and Java.

  • Anders Stenberg
    Jul 02, 2012 at 10:52

    Any more information available about Haxe/C++ Debugger somewhere?

  • Jul 02, 2012 at 11:31

    @Anders : it's still in the works, I think Hugh (@gamehaxe) will post more details as soon he's ready, hopefully for 2.10 final

  • Anders Stenberg
    Jul 02, 2012 at 16:17

    @Nicolas : Cool, thanks. Great new stuff in general!

  • Valentin
    Oct 13, 2012 at 12:37

    Thank you for you job!

Name : Email : Website : Message :