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


Haxe 2.07 Released !

Posted on Jan 30 2011

Haxe 2.07 has just been released and can be downloaded from !

I'm actually very happy with this release. The whole compiler team - which includes Franco, Hugh and myself - has been working very hard on fixing a lot of bugs and improve the overall programming experience. Thanks a lot also to all the users that have been reporting to us by using the Issue List.

Among the most important changes that 2.07 brings, are :

  • macros : I already wrote about macros on this blog, but there's now much more possibilities as stated in the documentation, including a way to do customize compiler behavior by writing Haxe code. So far only a few people have been putting macros in-use, but I expect to see great things done with it.
  • custom js code generator : macros can be used in particular to write your own custom javascript code generator, check haxe/std/haxe/macros/DefaultJSGenerator as and example !
  • flash player api : Haxe apis for the flash player have been updated to add 10.1 and 10.2 features. We also have a brand new @:require metadata that help to tag which API class/method/field can be used depending on the player version you're targeting. That's very useful when you want to ensure a good level of compatibility !
  • huge speed-up for compiler-based completion : since the Haxe compiler is doing quite a lot of things, it would be hard to mimic that in any IDE, so the compiler is actually used to give completion tips for the IDE. In 2.07, the amount of computation required to give these completion informations have been highly reduced, in particular for big projects.
  • and many other fixes, in particular for Haxe/C++ code generation, nicer JS output, etc, etc, etc !

There's actually some features in 2.07 that will prove very useful when Molehill public beta is released. Expect a big surprise at this time ;)

  • Serhiy Ukraine
    Jan 30, 2011 at 20:04

    Congratulations from Ukraine! Many thanks for your work.

  • Subb
    Jan 30, 2011 at 21:28

    Good job! BTW, I think you meant "Expect" in the last sentence. ;)

  • Jan 30, 2011 at 21:41

    @subb thanks for the typo report ;)

  • Jan 31, 2011 at 10:05

    macros are really amazing, and they differ significantly from macros in other languages.

    Essentially, you can pass an "expression" into a macro function. The compiler will check the expression to make sure it's valid, and then you can take the expression apart, change parts of it, access the os layer (read/write files, etc) via neko api's, and then rebuild a totally different expression that is then returned. This expression is then checked again by the compiler to ensure that everything is still valid.

    This makes it possible to parse and integrate configuration files and database interfaces at compile time, all the while using the compiler to do all the type checking work.

    Dealing with macros is a bit cumbersome right now, but this will improve as more helper routines get written for it.

  • Bob
    Jan 31, 2011 at 10:05

    In Common Lisp, regular macros operate on lists. Read macros operate on the underlying character stream and can do arbitrary parsing. The parsing for the list structure itself is implemented as a reader macro that parses parenthesized expressions.

    That being said, parentheses is a good default. It's simple enough to deal with that you don't have to fuss with lexing and parsing. When I write a DSL I'm interested in the semantics, not the surface syntax.

  • Jan 31, 2011 at 10:07

    I have had my eye on Haxe for a while now, but I have never actually taken the time to sit down and start a project with it. I must say I like the syntax better than AS 3, and the performance gains are nice. I guess the main reason I haven't used it is because I worry that there aren't going to be enough libraries for me to use should I desire to add some additional functionality in that I do not want to code from scratch.

    Should I try it anyway?

  • Bad Sector
    Jan 31, 2011 at 11:19

    Macros sound interesting.

    Although i'm waiting for the Molehill update, i might do some testing with macros for software rendering using the memory API. I did a few tests a while ago, but manually fiddling with the memory locations for everything was tiresome :-P

    Macros might help there :-)

  • Gustavs
    Jan 31, 2011 at 23:34

    You can link with AS3 libraries the same way as with resources in SWFs. Build a SWF with the stuff you want to use, including libraries, then use -swf-lib. Automatically accessible.

  • Durss
    Feb 01, 2011 at 15:46

    And I guess you also meant "Expect" not "except" at the end of the macro part? :P

    This news sounds, about.. crazy, as usual.

    Can't wait for the molehill related "thing" :)
    I Still never tried haxe (shame on me..) but i keep being inpressed each time a read/hear about it..

    Useless to say "good job" ;)

Name : Email : Website : Message :