Haxe 2.10 RC

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 http://try.haxe.org/#1cf90, a simpleHello 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 implyimport
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 offunction(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 haxe.org, 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 !
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 !
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.
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 :)
Amazing, Keep up the good work !!!
Very nice!
Haxe being the online live project around, you are the real developers.
An example of smarter type inference :
It is now possible for the compiler to use the expected type to ensure that the value match it.
Great work so far! The new type inference is pretty hawt... not to mention adding C# and Java.
Any more information available about Haxe/C++ Debugger somewhere?
@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
@Nicolas : Cool, thanks. Great new stuff in general!
Thank you for you job!