This is a Glossary of common terms and libraries used in the Haxe ecosystem, and is meant to help new users with new terms/words that may crop up when learning about Haxe and related technologies.
This is part of the Haxe language used for meta data, as it relates to pre-compile data or macros. You can define your own @, or here is a list of @ that are predefined:
This is related to macros and string interpolation, where you can use a variable within a string and it will be replaced by the compiler.
A special Haxe identiﬁer which outputs during compilation. It is very useful if you’re not sure of the type or an instance.
trace( $type("a string") ) ;// String
This part of the Haxe language is used to allow a Class to act like a container of another type—one which you don't want to prescribe until an instance of the class is used. For example you may have a Herd:
class Herd<T>then you use:
var cows = new Herd<Cow>;The "T" is used by convention and is short for “template”, but any other letter can be used when defining your class, e.g. <U> or <V>.
This part of the Haxe language is used for defining functions or typing them.
The underscore is used as default in switch statements and in the bind callback (see the pattern matching section).
This is used in code for targeting different platforms, a.k.a. “conditional compilation”. It is also used as a comment in hxml compile instructions.
Use this when you want to ensure that only a fixed number of values are used in a given circumstance.
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. See also SVN.
Haxe is distributed with haxelib, a tool which enables developers to share their code and libraries into a common repository.
HSS is tool that extends the CSS syntax with powerful features such as variables and nested blocks.
HxSL - Haxe Shader Language for hardware-accelerated 3D rendering using Macros. It uses Haxe syntax and can directly be embedded into Haxe programs’ source.
Lambda is a functional language concept within Haxe that allows you to apply a function to a set.
Macros in Haxe are used to pre-process or generate code, so they can be used for simple things like adding today’s date in your code or for more complex aspects like parsing some XML into an object structure of code and inserting it into the code. Macro are compiled before your normal code in a pre-processing step.
Strictly typed languages enforce typing on all data being interacted with, Haxe does allow some dynamic coding, i.e. code that contains unresolved types evaluated on the fly, but mostly you should fully type all your code. Taking the case of an Array, it is typed with what it contains e.g.: var arr = new Array<String>(); Using untyped or Dynamic in Haxe is dangerous because you can get more run-time errors, the aim of Strict typing is to reduce errors to just being found during compile (Haxe promotes the approach of using the compiler to catch typing errors). Ruby is an example of a language that is weakly typed, and AS3 is an example of a language that appears to be strictly typed but dangerously is not, since Arrays and Functions are not typed in AS3.
Neko is a high-level dynamically-typed programming language. It can be used as an embedded scripting language (as a Virtual Machine). It has been designed to provide a common runtime for several different languages. Neko is often targeted by Haxe as a replacement for the PHP backend web language. It interfaces well with C but can also be used on the desktop. When it runs on a web server it runs in a Virtual Machine, which is safer than both the PHP and C++ Haxe backends. Haxe provides standard libraries that allow you to easily switch between Neko and other backends via the sys and other packages, making Neko a perfect target for when your PHP site starts to really take off and you want to use a VPS server.
Making constructs "first-class"
reification == makes things more real == turns my macro ideas into actual real objects that can be manipulated and moved around and played with.
Related terms: quasi-quotation/anti-quotation
quasi-quotation is being able to embed some chunk of code and deal with it as an object, and anti-quotation is mixing that with values from the code dealing with that piece of code again.
Simple Persistent Objects Database Library (SPOD) is part of the standard Haxe distribution. It is the same concept as ORM, Object-relational mapping, it allows you to access tables and entries in a database with dot notation, so you can treat them as if you’re dealing with normal objects within your code.
Subversion is a free/open source version control system (VCS). That is, Subversion manages files and directories and the changes made to them over time. This allows you to recover older versions of your data or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine.” Many Haxe code libraries are found on Google Code which often uses SVN. But also an alternative GIT version control is often prefered, Haxe libraries are often hosted on Github, Bitbucket or similar.