Overview of Haxe beginner snippets and tutorials.
Jan 11, 2018 Beginner / Using arrays
In Haxe, the Array type represents a collection of elements ordered by their index (order number) in the collection.
Jan 11, 2018 Beginner / Conditional compilation
This snippet demonstrates use of conditional compilation with custom compiler flags.
Jan 11, 2018 Beginner / Working with date and time
The Date class provides a basic structure for date and time related information. This article shows how to work with the date and time tools.
Jan 11, 2018 Beginner / Declare classes
Create a new class with two functions and create a new instance of it.
Jan 11, 2018 Beginner / Declare functions
Declare function with arguments
Jan 11, 2018 Beginner / Using enum / ADT
Haxe's enumeration types are algebraic data types. Their primary use is for describing data structures.
Jan 11, 2018 Beginner / Hello world
This tutorial demonstrates how to write and compile a Hello World Haxe program. It explains the involved file-format (.hx) and gives a basic explanation of what the Haxe Compiler does with them.
Jan 11, 2018 Beginner / Using lists
In Haxe, the List type represents a linked-list of elements.
Jan 11, 2018 Beginner / Loading a file from web
This example uses haxe.Http to load external json file using and demonstrates how to handle the result.
Jan 11, 2018 Beginner / Using maps
In Haxe, Map (also known as dictionary) allows key to value mapping for arbitrary value types and many key types.
Jan 11, 2018 Beginner / Using numbers
Define integers and floats:
Jan 11, 2018 Beginner / Pattern matching
This article helps to learn pattern matching and all of its type of matching in practice. The article covers basic matching, variable capture, guards, extractors and enum/structure matching.
Jan 23, 2018 Beginner / Invoke object method by string
To invoke method by it's name you will need to use Reflection API.
Jan 11, 2018 Beginner / Using regular expressions
In Haxe a regular expression starts with ~/ and ends with a single / and is of type EReg.
Jan 11, 2018 Beginner / Access a field by string
This snippet shows how to use a string as a variable identifier using reflection.
Jan 11, 2018 Beginner / Using strings
Defining string literals take be done by wrapping text inside double or single quotes:
Jan 11, 2018 Beginner / Using the file system
Using file system in Haxe is made easy because of the sys package. These are the Haxe targets that can directly access the filesystem:
Jan 11, 2018 Beginner / Using static extensions
The concept of static extensions is a very poweful concept that gives the possibility of keeping types and objects lightweight, and extending them with functionality only when actually needed. Here we will have a look at how some commonly used methods for basic types are implemented as extension methods, and how you can write your own.