Haxe

Haxe
ParadigmMulti-paradigm: object-oriented, functional, generic
FamilyECMAScript
DeveloperHaxe Foundation
First appearedNovember 14, 2005 (2005-11-14)
Stable release
4.3.6[1] Edit this on Wikidata / 7 August 2024 (7 August 2024)
Typing disciplinestatic, dynamic via annotations, nominal
Scopelexical
Implementation languageOCaml
PlatformIA-32, x86-64, AArch64, armel, armhf, MIPS, MIPS64el, MIPSel, ppc64el, RISC-V, s390x
OSAndroid, iOS; Linux, macOS, Windows
LicenseGPL 2.0, library: MIT
Filename extensions.hx, .hxml
Websitehaxe.org Edit this at Wikidata
Influenced by
ECMAScript, JavaScript, ActionScript, OCaml, Java, C++, PHP, C#, Python, Lua, NekoVM

Haxe is a high-level cross-platform programming language and compiler that can produce applications and source code for many different computing platforms from one code-base. It is free and open-source software, released under an MIT License.[2] The compiler, written in OCaml, is released under the GNU General Public License (GPL) version 2.

Haxe includes a set of features and a standard library[3] supported across all platforms, including numeric data types, strings, arrays, maps, binary, reflective programming, maths, Hypertext Transfer Protocol (HTTP), file system and common file formats. Haxe also includes platform-specific application programming interfaces (APIs) for each compiler target.[4] Kha, OpenFL, and Heaps.io are popular Haxe frameworks that enable creating multi-platform content from one codebase.[5]

Haxe originated with the idea of supporting client-side and server-side programming in one language, and simplifying the communication logic between them.[6] Code written in Haxe can be compiled into JavaScript, C++, Java, JVM, PHP, C#, Python, Lua[7] and Node.js.[8] Haxe can also directly compile SWF, HashLink, and NekoVM bytecode and also runs in interpreted mode.[9]

Haxe supports externs (definition files) that can contain data type information of extant libraries to describe target-specific interaction in a type-safe manner, like C++ header files can describe the structure of existing object files. This enables to use the values defined in the files as if they were statically typed Haxe entities. Beside externs, other solutions exist to access each platform's native capabilities.

Many popular IDEs and source code editors have support available for Haxe development.[10] No particular development environment or tool set is officially recommended by the Haxe Foundation, although VS Code, IntelliJ IDEA and HaxeDevelop have the most support for Haxe development. The core functionalities of syntax highlighting, code completion, refactoring, debugging, etc. are available to various degrees.

  1. ^ "Release 4.3.6". 7 August 2024. Retrieved 22 August 2024.
  2. ^ "Open Source licence Haxe".
  3. ^ Introduction to the Haxe Standard Library, Haxe Docs
  4. ^ Target Specific APIs, Introduction to the Haxe Standard Library, Haxe Docs
  5. ^ Doucet, Lars (2014-06-24). "Dear Adobe: Support Haxe, save your Tools". Gamasutra.
  6. ^ "Haxe Interview". Io Programmo. 2009-04-01. pp. 1–6. Archived from the original on 2015-12-08. Retrieved 2015-08-06.
  7. ^ "Hello Lua!". Haxe.org.
  8. ^ "hxnodejs".
  9. ^ "Compiler Targets". Haxe. Retrieved 2021-11-05.
  10. ^ List of IDEs supporting Haxe, Haxe Foundation

Developed by StudentB