Haxe 3.4.4 and Haxe 4.0 preview 2 are released


(Valentin Lemière) #1

Dear Community,

On behalf of the Haxe Foundation we are proud to announce that Haxe 3.4.4 is now officially released!

Haxe 3.4.4

Release notes:

  • This is the current stable release and from today on we also ship the 64-bits version of the compiler for Windows users.
  • This release addresses a problem with the Flash target output that would cause invalid .swf files to be generated.

Download link:

Haxe 4.0.0 preview 2

Another surprise is that we continued on Haxe 4 and this is the new preview we proudly want to share.

This release removes the old PHP target, which means Haxe is going to output only PHP7 from now on. Furthermore, we are removing some parts of the standard library. For easier transition, they are still available in this haxelib:

The major new feature of this release is the addition of the final keyword, which can be used in place of var for class fields. For static fields, it behaves like var name(default, never). For instance fields, it allows assignment to the variable only from the class constructor. Further refinements and documentation will follow.

This release also contains the arrow functions and the reworked macro interpreter.

There have also been, of course, various bugfixes. We will make an effort to have monthly preview releases for the remainder for 2017, and then move on to RC releases once we are happy with where Haxe 4 is.

Download link:

(Valentin Lemière) #2

(Jason O'neil) #3

With the final keyword in class instances, you say that it “allows assignment to the variable only from the class constructor”. Does it also require assignment in the class constructor?

As in, will you get an error message if you have a “final” instance field that you forget to initialise?

(Valentin Lemière) #4

Yes, you’ll have the error message final field foo must be initialized immediately or in the constructor.

(Valentin Lemière) #5