Haxe 2.10

Haxe 2.10 was released on July 16, and includes the following features :

  • Java and C# targets ! Compile with -java or -cs to output Java or C# source code ! Big thanks to Cauê Waneck who is working on this. Note that these targets are still considered beta. However, please try them out, report bugs and improvements for their final implementation in Haxe 3.0.
  • Reduced JS output : We have worked hard on the --dead-code-elimination flag, which now can eliminate unused Haxe standard lib code from the output. As you can see on http://try.haxe.org/#1cf90, a simple Hello Haxe example will be reduced to only 7 lines of JS. We will still activate important features such as reflection if any corresponding API calls are made (such as Type.getClassName)
  • Smarter Type inference : Haxe type inference is now even smarter. It can now correctly infer the "minimal type" for constructs using multiple values such as constant arrays / switch / etc. Also, it can auto-detect the expected enum in many cases, enabling you to use the constructor without the need to import it. Finally, it can now do subtyping and variance on constant structures and arrays.
  • Macros reification : Haxe macros have been available since early 2011, leading to many successful projects. However it is often hard to manipulate AST enums by hand. With the addition of reification, macros become much more accessible and usable.
  • A Haxe/C++ Debugger is included ! We will soon publish details on how you can remotely debug your code interactively whatever the platform you target (iOS, Android, and all others Haxe/C++ targets)
  • Languages improvements : we also made many small language improvements, which together makes Haxe a lot better :
    • allow direct initialization of properties and member variables
    • using now implies import as well
    • sub classes can now widen method visibility
    • overriden methods can now be covariant with respect to the original definition
    • allows underscore 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 who has been a great help with the compiler internals since he joined us.

You can download Haxe 2.10 from the download page right now.

You can also read the full ChangeLog and (if you are have a lot of free time) check out the 693 revisions since 2.09

If you have any question or want to learn more about Haxe, don't hesitate to join the Haxe Discussion Group

version #15102, modified 2012-07-16 23:55:25 by jjdonald