Glossary Of Haxe Terminology

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:
    • @
    • General meta data
      Note: you can get the current list with the terminal command: haxe --help-metas
  • $


    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.
  • $type


    A special Haxe identifier which outputs during compilation. It is very useful if you’re not sure of the type or an instance.
    trace( $type("a string") ) ;// String
  • <T>


    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>.
  • #if


    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.
  • enum


    Use this when you want to ensure that only a fixed number of values are used in a given circumstance.
  • GiT


    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.
    • GIT
    • Common places to find opensouce Haxe libraries Github, Google codeBitbucket and ofcourse haxelib where many core opensource Haxe libraries are also hosted, often the stable versions with other repositories hosting development branches.
  • haxelib


    Haxe is distributed with haxelib, a tool which enables developers to share their code and libraries into a common repository.
  • HSS


    HSS is tool that extends the CSS syntax with powerful features such as variables and nested blocks.
  • HxSL


    HxSL - Haxe Shader Language for hardware-accelerated 3D rendering using Macros. It uses Haxe syntax and can directly be embedded into Haxe programs’ source.
  • Macro


    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 ( often meaning very Strong Typed )


    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


    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.
  • OpenFL / NME


    OpenFL ( formally NME ) is a library that makes using C++ Haxe suitable for coding RIA and games. It can also be used to create Html5/Javascript content, and adds some features to the Flash target. OpenFL emulates a subset of the Flash API, so largely if you know Flash you will be able to create C++ games for mobile and desktop. Find out more on the websites dedicated to OpenFL/NME:
  • Reification ( normally used in relation to Macros )


    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.
  • SPOD


    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.
  • SVN


    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.
  • typedef


    Is a functional language concept in Haxe that allows you to define type definitions which are a kind of type shortcut that can be used to give a name to a structure type or a long type that you don't want to repeat everywhere in your program. It is particularly useful in allowing Haxe to integrate well with all of its programming targets. This can be seen by looking at how much of the Haxe JavaScript language is implemented through typedefs.
version #20117, modified 2014-05-22 07:16:17 by vitalyo