Haxe Code Cookbook

Easy to read Haxe coding examples.

Start browsing..

Beginner (10)Compilation (1)Data structures (4)Macros (15)Other (6)Abstract types (5)Design patterns (3)Principles (3)


 macro-function (9) cppia (1) iterator (3) canvas (1) enum (3) type-parameter (1) validation (3) building-fields (6) collections (2) build-macro (6) math (2) modules (1) dead-code-elimination (3) git (1) abstract-type (6) ereg (2) extern (1) type-parameter-constraint (1) data-structures (2) javascript (3) process (1) pattern-matching (2) type-params (1) reflection (1) class (3) arguments (2) filesystem (1) conditional-compilation (2) completion (1) binary (1) libraries (2) array (1) static-extension (2) json (1)

Newest articles

20-10-2016 Beginner / Access a field using a string

This snippet shows how to use a string as a variable identifier using reflection...

Read »

14-10-2016 Other / Working with cppia

This article consist of 4 pages

This article is about cppia, a scriptable cpp subtarget for Haxe. A cppia script is a instructions assembly script that can be run inside a cppia host and gives you Neko JIT runtime speed at near-zero compilation time. It also lets add performance critical code to the host, wich gives you full cpp runtime speed for those parts...

Read »

13-10-2016 Abstract types / Color as abstract type

The following example demonstrates how a color type can be abstracted over an integer, which stores the color in an ARGB format...

Read »

Learning by example

The Haxe Foundation facilitates the following code cookbook for the Haxe commmunity. Enjoy learning Haxe; It is great!

More documentation

Haxe Manual

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Contribution is easy

The project is being developed on GitHub. Feel free to contribute code snippets.

Haxe Code Cookbook on Github