by Jon (Updated on 2015-10-21)
- Further Reading
With our move towards a unified, cross-platform enginem we've adopted Haxe, a language that's remarkably similar to ActionScript 3, but at the same time, has enough small differences to force all existing code to be ported. This guide is a light introduction to Haxe for AS3 developers.
Areas where the basic syntax and structures are different include...
- Basic Types are slightly different and all capitalized.
- Package Declarations are done Java-style.
Class Definitions don't include public. Constructors are defined using new rather than
- For Loops have a more concise syntax.
- Casting has a different syntax.
- Checking for "null" has to be done explicitly.
- No Dictionaries, but Haxe has strongly-typed Maps.
- Function pointers have to be typed explicitly.
- Getter/Setter syntax is different.
- All package must be in lower-case, but all class names must start with upper case.
- You can't import classes using wildcards.