SUPPORT THE WORK

GetWiki

Haxe

ARTICLE SUBJECTS
aesthetics  →
being  →
complexity  →
database  →
enterprise  →
ethics  →
fiction  →
history  →
internet  →
knowledge  →
language  →
licensing  →
linux  →
logic  →
method  →
news  →
perception  →
philosophy  →
policy  →
purpose  →
religion  →
science  →
sociology  →
software  →
truth  →
unix  →
wiki  →
ARTICLE TYPES
essay  →
feed  →
help  →
system  →
wiki  →
ARTICLE ORIGINS
critical  →
discussion  →
forked  →
imported  →
original  →
Haxe
[ temporary import ]
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{distinguish|Hack (programming language)}}







factoids
weblinkType system>Static, Dynamic typing via annotations, Nominal type system>nominalAndroid (operating system)>Android, iOS; Linux, macOS, WindowsARM architecture>ARM; IA-32, x86-64| file ext = .hx, .hxmlhaxe.org}}ActionScript, OCaml, Java (programming language)>Java| programming language = OCaml}}Haxe is a high-level cross-platform multi-paradigm programming language and compiler that can produce applications and source code, for many different computing platforms, from one code-base.WEB,weblink Nicolas' announcement of spelling change on Haxe official mail list, BOOK, Franco, Ponticelli, 2008-02-11, Professional haXe and Neko,weblink Wiley, 0470122137, BOOK, Michael, Ivanov, 2011-05-24, Away3D 3.6 Cookbook,weblink Packt Publishing Ltd, 1849512817, WEB,weblink Haxe/OpenFL for home game consoles, Lars, Doucet, Gamasutra, 2015-06-03, It is free and open-source software, distributed under the GNU General Public License (GPL) version 2, and the standard library under the MIT License.Haxe includes a set of common functions that are supported across all platforms, such as numeric data types, text, arrays, binary and some common file formats.Introduction to the Haxe Standard Library, Haxe Docs Haxe also includes platform-specific application programming interface (API) for Adobe Flash, C++, PHP and other languages.Target Specific APIs, Introduction to the Haxe Standard Library, Haxe Docs OpenFL, Kha and Flambe are popular Haxe frameworks that enable creating multi-platform content from one codebase.WEB,weblink Dear Adobe: Support Haxe, save your Tools, Lars, Doucet, Gamasutra, 2014-06-24, Haxe originated with the idea of supporting client-side and server-side programming in one language, and simplifying the communication logic between them.JOURNAL,weblink Haxe Interview, Io Programmo, 2009-04-01, 1–6, BOOK, John, Grden, Patrick, Mineault, Aral, Balkan, Marc, Hughes, Wade, Arnold, 2008-07-16, The Essential Guide to Open Source Flash Development,weblink Apress, 1430209941, Chapter 9 (Using Haxe), BOOK, Matt, Fisher, 2013-01-01, HTML5 for Flash Developers,weblink Packt Publishing Ltd, 1849693331, Code written in the Haxe language can be source-to-source compiled into ActionScript 3, JavaScript, Java, C++, C#, PHP, Python, LuaWEB,weblink Hello Lua! - Haxe, 2016-07-09, and Node.js.WEB,weblink hxnodejs (4.0.9), 2016-07-09, Haxe, iPhone & C++ At Last, GameHaxe website Haxe can also directly compile SWF and Neko bytecode.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 and IntelliJ IDEA have extensions to support Haxe development. The core functionalities of syntax highlighting, code completion, refactoring, debugging, etc., are available in various degree. The comparison of IDE choices for Haxe programmers has quite in-depth information.To help leverage existing code, the Haxe community has created source code converters for ActionScript 3 to Haxeas3hx, AS3 to Haxe converter, Haxe source code repository and C# to HaxeCS2HX - C# to haXe converter, CodePlex project hosting The Haxe compiler can also output Haxe into standalone ActionScript 3, C++, C#, Java, PHP, Python source code,Haxe Compiler Targets, Haxe Docs which can then be pulled out of the Haxe ecosystem and developed with traditional workflows.Major users of Haxe include BBC, Coca-Cola, Disney, Hasbro, Mattel, Nickelodeon, Prezi, TiVo, Toyota, and Zynga.Companies using Haxe, Haxe Docs

History

Development of Haxe began in October 2005.WEB,weblink Haxe 3.2 Release, Github, The first beta version was released in February 2006. Haxe 1.0 was released in April 2006, with support for Adobe Flash, JavaScript, and Neko programs. Support for PHP was added in 2008, and C++ was added in 2009. Modern platforms such as C# and Java were added with a compiler overhaul in 2012.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.WEB,weblink Haxe mailing list post on naming, yes,weblink" title="web.archive.org/web/20070328232003weblink">weblink 2007-03-28, Haxe is the successor to the open-source ActionScript 2 compiler MTASC, also built by Nicolas Cannasse,MTASC Compiler, MTASC website and is released under the GNU General Public License version 2 or later.WEB,weblink Haxe license page, yes,weblink" title="web.archive.org/web/20120512000007weblink">weblink 2012-05-12,

Compiler

The Haxe language can compile into bytecode for different virtual machines such as the Adobe Flash Player and Neko, and can generate source code in C#, C++, ActionScript 3, JavaScript and LuaThe Haxe compiler is an optimizing compiler, and uses function inlining, constant folding, and dead code elimination (DCE) to optimize the run-time performance of compiled programs.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 following table documents platform and language support in Haxe. {| class="wikitable sortable"! scope="col"| Code generator! scope="col"| Output! scope="col"| Platform! scope="col"| Use! scope="col"| Since Haxe version! scope="row"| ActionScript 3| source| Adobe Flash Player 9+, Adobe AIR| Server, desktop| 2007 (1.12)! scope="row"| C++ (hxcpp)| source| Windows, Linux, macOS| Server, desktop, CLI| 2009 (2.04)! scope="row"| C++| sourceAndroid (operating system)>Android,HTTP://GAMEHAXE.COM/2010/06/28/ANDROID-PORT-FIRST-LIGHT/ >TITLE=BLOG POST MENTIONING ANDROID PORT PROGRESS, Apple iOS, Palm webOSHTTPS://DEVELOPER.PALM.COM/DISTRIBUTION/VIEWTOPIC.PHP?F=70&T=8499 >TITLE=HOW TO GET STARTED WITH HAXE 2.06 AND THE WEBOS PDK [ARCHIVED ON WAYBACKMACHINE] ARCHIVEURL=HTTPS://WEB.ARCHIVE.ORG/WEB/20141022194729/HTTPS://DEVELOPER.PALM.COM/DISTRIBUTION/VIEWTOPIC.PHP?F=70&T=8499, October 22, 2014, | Mobile| 2009 (2.04)! scope="row"| C#| source| .NET Framework| Server, desktop, mobile| 2012 (2.10)! scope="row"| Java| sourceJava (software platform)>Java| Server, desktop| 2012 (2.10)! scope="row"| JavaScript| source| HTML5, NodeJS, PhoneGap| Server, desktop, browser, mobile| 2006! scope="row"| Neko| byte code| NekoVM| Server, desktop, CLI| 2005! scope="row"| PHP| source| PHP| Server| 2008 (2.0)! scope="row"| Python| source| Python| CLI, web, desktop| 2014 (3.2)! scope="row"| Lua| source| Lua| CLI, web, desktop, mobile| 2016 (3.3)! scope="row"| SWF with ActionScript 2| byte code| Adobe Flash Player 6+| Desktop, browser| 2005! scope="row"| SWF with ActionScript 3| byte code| Adobe Flash Player 9+, Adobe AIR, Tamarin| Desktop, browser, server| 2005! scope="row"| Hashlink| byte code| Hashlink VM| Server, desktop| 2016 (3.4)

Language comparison

Haxe has much in common with ActionScript 3. The Haxe compiler is developed in the OCaml language. No knowledge of OCaml is needed to develop applications using Haxe. Advantages to using Haxe over ActionScript 3 include:

Performance comparison

The run-time performance of Haxe programs varies depending on the target platform:
  • ActionScript 3: Programs produced using the Haxe compiler usually run faster than programs produced using the Apache Flex SDK ActionScript Compiler.AS3 vs haXe performance, SplashDust website However, using ActionScript Compiler 2 (ASC2) with manual optimizing,AS3 Performance Optimization, Starling Wiki many have reported comparable performance.
  • JavaScript: Programs produced using the Haxe compiler run at a comparable speed to handwritten JavaScript programs.WEB,weblink On "You can't make good HTML5 games in Haxe", Yellow After Life, 2013-12-05, Vadim, Dyachenko, OpenFL is a common Haxe-powered framework that can run in HTML5-JavaScript, but content built with OpenFL currently suffers performance issues on mobile devices.
  • C++: Programs produced using the Haxe compiler rival handwritten C++ programs, but C++ applications built with OpenFL suffer major performance issues.WEB,weblink OpenFL & Haxe, A Bumpy Start, Talha, Kaya, 2014-07-04, Gamasutra,

Language

Haxe is a general-purpose language supporting object-oriented programming, generic programming, and various functional programming constructs. Features such as iterations, exceptions, and code reflection are also built-in functions of the language and libraries.WEB,weblink Haxe language reference, yes,weblink" title="web.archive.org/web/20120502064424weblink">weblink 2012-05-02, Unusual among programming languages, Haxe contains a type system which is both strong and dynamic. The compiler will check types implicitly and give compile-time errors, but it also enables the programmer to bypass type-checking and rely on the target platform's dynamic type-handling.Since Haxe had its origins in ActionScript 3, all of the existing Flash API can be used, although Haxe requires better-formed code and programming standards than Adobe compilers (for example, regarding scoping and data typing).

Type system

Haxe has a sophisticated and flexible type system. The type kinds it offers are classes, interfaces, function-method types, anonymous types, algebraic data types (ADTs, called enum in Haxe), and abstract types. Parametric polymorphism is possible with classes, ADTs and function types, giving the language support for generic programming based on type erasure. This includes support for variance in polymorphic functions, although not in type constructors.The type system is static unless annotations for dynamic typing are present, for use with targets that support them. Type checking follows nominal typing with the exception of anonymous types where structural typing is used instead. Finally, type inference is supported, allowing for variable declarations without type annotations.

Classes

Classes (keyword class) in Haxe are similar to those in Java or ActionScript 3. Their fields can be either methods, variables, or properties, each static or per instance respectively.Haxe supports the accessors public and private, and more advanced methods for access control (ACL, link) that are denoted using annotations. Methods and static constant variables can be inlined using the keyword inline.Interfaces in Haxe are very similar to those in, for example, Java.interface ICreature {
public var birth:Date;
public var name:String;


public function age():Int;
}class Fly implements ICreature {
public var birth:Date;
public var name:String;
public function age():Int return Date.now().getFullYear() - birth.getFullYear();
}

Enumerated types

Enumerated types are an important feature of the language; they can have type parameters and be recursive.WEB,weblink Haxe reference detailing the use of enum, yes,weblink" title="web.archive.org/web/20120511193500weblink">weblink 2012-05-11, They provide basic support for algebraic data types, allowing the inclusion of product types, in a fashion similar to Haskell and ML. A switch expression can apply pattern matching to an enum value, allowing for elegant solutions to complex programming problems:enum Color {
red;
green;
blue;
rgb( r : Int, g : Int, b : Int );
}class Colors {
static function toInt ( c : Color ) : Int {
return switch ( c ) {
case red: 0xFF0000;
case green: 0x00FF00;
case blue: 0x0000FF;
case rgb(r, g, b): (r


- content above as imported from Wikipedia
- "Haxe" does not exist on GetWiki (yet)
- time: 2:41am EST - Sat, Feb 23 2019
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 09 MAY 2016
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
GETWIKI 20 AUG 2014
GETWIKI 19 AUG 2014
GETWIKI 18 AUG 2014
Wikinfo
Culture
CONNECT