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. The compiler is written in OCaml. It can be run in server-mode to provide code completion for integrated development environments (IDEs).Server mode command-line: haxe --wait [host:]port
Haxe includes a set of features and a standard library Introduction to the Haxe Standard Library, Haxe Docs supported across all platforms, including numeric data types, strings, arrays, maps, Binary file, reflective programming, maths, Hypertext Transfer Protocol (HTTP), file system and common . Haxe also includes platform-specific application programming interfaces () for each compiler target. Target Specific APIs, Introduction to the Haxe Standard Library, Haxe Docs Kha, OpenFL, and Heaps.io are popular Haxe frameworks that enable creating multi-platform content from one codebase.
Haxe originated with the idea of supporting client-side and server-side programming in one language, and simplifying the communication logic between them. Code written in Haxe can be compiled into JavaScript, C++, Java, Java virtual machine (JVM), PHP, C#, Python, Lua and Node.js. Haxe can also directly compile SWF, HashLink, and NekoVM bytecode and also runs in interpreted mode.
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 . 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 abilities.
Many popular IDEs and source code editors have support available for Haxe development. List of IDEs supporting Haxe, Haxe Foundation 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.
Haxe was developed by Nicolas Cannasse and other contributors, and was originally named haXe because it was short, simple, and "has an X inside", which the author asserts humorously is needed to make any new technology a success.
Haxe is the successor to the open-source ActionScript 2 compiler MTASC, MTASC Compiler, MTASC website also built by Nicolas Cannasse and is released under the GNU General Public License version 2 or later.
This strategy of compiling to multiple source code languages is inspired by the write once, run anywhere paradigm. It also allows the programmer to choose the best platform for the job. Typical Haxe programs run identically on all platforms, but developers can specify platform-specific code and use conditional compilation to prevent it from compiling on other platforms.
The Haxe compiler is an optimizing compiler, and uses Inline expansion, Tail call, constant folding, loop unrolling and dead code elimination (DCE) to optimize the run-time performance of compiled programs. The Haxe compiler offers opt-in Void safety, it checks compile-time for nullable values. The run-time performance of Haxe programs is at comparable speed to handwritten sources.
|
|