Downloading Haxe 4.0.0-preview.5

If your download does not begin automatically please click here.

Support the Haxe Foundation

Thank you for downloading Haxe. If you'd like to support the Haxe Foundation please consider donating to keep our open source efforts thriving.

Monthly Donation Amount

Get Technical Help

Get support directly from the Haxe team. The Haxe Foundation offers several support tiers to help with your organization's technical challenges.

Explore our support plans

What next?

Release Notes

Dear Community,

On behalf of the Haxe Foundation, we are proud to announce the official release of the Haxe 4.0.0-preview.5! It is available along with the changelog at https://haxe.org/download.

As a preview release, it should not be considered stable. However, we appreciate anyone testing this version which will help us with the real Haxe 4 release. Please report any issues here:

https://github.com/HaxeFoundation/haxe/issues

Thank you very much for your help!

Change Log

2018-10-13: 4.0.0-preview.5

New features:

  • all : support Unicode strings properly on all targets
  • all : support for (key => value in e) syntax for key-value iterators
  • all : added keyValueIterator to Map and its implementations
  • all : support loop-unrolling on for (i in 0...5) (#7365)
  • all : added support for write-mode @:op(a.b)
  • all : support inline call() and inline new expressions (#7425)
  • all : support @:using on type declarations (#7462)
  • all : support XML literal strings but require them to be macro-processed (#7438)
  • all : allow enum values without arguments as default function argument values (#7439)
  • lua : add -D lua-vanilla, which emits code with reduced functionality but no additional lib dependencies

General improvements and optimizations:

  • all : [breaking] reserved operator and overload as keywords (#7413)
  • all : made final on structure fields invariant (#7039)
  • all : [breaking] disallowed static variables that have no type-hint and expression (#6440)
  • all : added display/typeDefinition to display protocol (#7266)
  • all : fixed various display-related problems
  • all : made parser in display mode much more tolerant
  • all : allowed assigning [] where Map is expected (#7426)
  • all : unified various parts of the String API across all targets
  • php : Optimized haxe.ds.Vector (VectorData is not Array anymore)
  • php : Optimized Map.copy() and Array.copy()
  • php : Optimized iterators of Map and native arrays.
  • php : Support native PHP generators. See php.Syntax.yield() and php.Generator
  • js : updated HTML externs
  • eval : improved object prototype field handling (#7393)
  • eval : optimized int switches (#7481)
  • eval : improved IntMap and StringMap performance
  • eval : improved performance of instance calls

Removals:

  • all : disallowed get_x/set_x property syntax, use get/set instead (#4699)
  • all : disallowed default values on interface variables (#4087)
  • all : disallowed implements Dynamic on non-extern classes (#6191)
  • all : warn about expressions in extern non-inline fields (#5898)
  • all : removed -D use-rtti-doc, always store documentation instead (#7493)
  • all : disallowed macro-in-macro calls (#7496)
  • js : removed jQuery and swfobject externs (#7494)

Bugfixes:

  • all : fix GC compacting too often in server mode
  • all : [breaking] function () { }(e) is no longer parsed as a call (#5854)
  • all : fixed various minor inlining issues
  • all : disallowed return null from Void-functions (#7198)
  • all : fixed various pattern matching problems
  • all : fixed compiler hang in display mode (#7236)
  • all : fixed the XML printer trimming CDATA content (#7454)
  • all : fixed invalid visibility unification with statics (#7527)
  • php : Escape $ in field names of anonymous objects (#7230)
  • php : Generate switch as if...else if...else... to avoid loose comparison (#7257)
  • cs : fixed bad evaluation order in structures (#7531)
  • eval : fixed various problems with the debugger
  • eval : fixed Vector.fromArrayCopy (#7492)
  • eval : fixed bad string conversions on invalid + operations

Standard Library:

  • all : [breaking] made Lambda functions return Array instead of List (#7097)
  • all : added haxe.iterators package
  • all : improved StringTools.lpad/rpad/htmlEscape implementation

Getting Started With Haxe

Now that you've downloaded Haxe, you can get started with a specific platform. Click on a logo to learn how to set up the development environment and how to proceed from there:

For getting started with Haxe, take a look at our introduction, read through the Haxe Manual or look at these use cases for Haxe, including tutorials and popular libraries: