Haxe Code Cookbook

Community driven Haxe code snippets, examples and tutorials.



Learn with Haxe

There are many ways to learn Haxe. On this website you'll find a lot of resources you need to become a Haxe developer.

So why not start learning and join the community today? If you haven’t learned Haxe yet, the time is now.


Latest articles

Apr 27, 2021 Macros / Strictly Typed JSON

It's possible read JSON files at compile time into strictly typed objects in Haxe.‥

Read »

Mar 03, 2021 Abstract types / Pipe using Abstract Operator Overloading

The following example demonstrates how the pipe operator is used to clean up nested function calls with Abstract Operator Overloading.‥

Read »

Jun 24, 2020 Beginner / Declare classes using @:structInit

As an alternative to the traditional way of instantiating classes using the new keyword - which is how it's done in most object oriented languages such as Java or C# - you can use the @:structInit metadata when you declare the class.‥

Read »

May 05, 2020 Design patterns / Method chaining / Fluent interface

This is an example of the Method chaining design pattern in Haxe.‥

Read »

The cross-platform development toolkit

Haxe is a modern high-level strictly-typed programming language with a fast optimizing cross-compiler.

Download Haxe 4.2.0
Released: 2021-02-09

Learning by example

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

More documentation:

Haxe 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, tutorials and how-to guides.

Haxe Code Cookbook on Github

Star   Fork