<s>
Haxe	B-Language
is	O
a	O
high-level	O
cross-platform	B-Operating_System
programming	O
language	O
and	O
compiler	B-Language
that	O
can	O
produce	O
applications	O
and	O
source	O
code	O
,	O
for	O
many	O
different	O
computing	B-Device
platforms	I-Device
from	O
one	O
code-base	O
.	O
</s>
<s>
It	O
is	O
free	B-License
and	I-License
open-source	I-License
software	I-License
,	O
released	O
under	O
the	B-License
MIT	I-License
License	I-License
.	O
</s>
<s>
The	O
compiler	B-Language
,	O
written	O
in	O
OCaml	B-Language
,	O
is	O
released	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
(	O
GPL	B-License
)	O
version	O
2	O
.	O
</s>
<s>
Haxe	B-Language
includes	O
a	O
set	O
of	O
features	O
and	O
a	O
standard	O
library	O
supported	O
across	B-Operating_System
all	I-Operating_System
platforms	I-Operating_System
,	O
like	O
numeric	O
data	O
types	O
,	O
strings	O
,	O
arrays	O
,	O
maps	B-Application
,	O
binary	O
,	O
reflection	B-Language
,	O
math	O
,	O
Hypertext	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
(	O
HTTP	B-Protocol
)	O
,	O
file	O
system	O
and	O
common	O
file	O
formats	O
.	O
</s>
<s>
Haxe	B-Language
also	O
includes	O
platform-specific	O
API	O
's	O
for	O
each	O
compiler	B-Language
target	O
.	O
</s>
<s>
Kha	O
,	O
OpenFL	B-Application
and	O
Heaps.io	O
are	O
popular	O
Haxe	B-Language
frameworks	O
that	O
enable	O
creating	O
multi-platform	B-Operating_System
content	O
from	O
one	O
codebase	O
.	O
</s>
<s>
Haxe	B-Language
originated	O
with	O
the	O
idea	O
of	O
supporting	O
client-side	B-Operating_System
and	O
server-side	B-Application
programming	O
in	O
one	O
language	O
,	O
and	O
simplifying	O
the	O
communication	O
logic	O
between	O
them	O
.	O
</s>
<s>
Code	O
written	O
in	O
the	O
Haxe	B-Language
language	O
can	O
be	O
compiled	B-Language
into	O
JavaScript	B-Language
,	O
C++	B-Language
,	O
Java	B-Device
,	O
JVM	B-Language
,	O
PHP	B-Application
,	O
C#	B-Application
,	O
Python	B-Language
,	O
Lua	B-Language
and	O
Node.js	B-Language
.	O
</s>
<s>
Haxe	B-Language
can	O
also	O
directly	O
compile	B-Language
SWF	O
,	O
HashLink	B-Language
,	O
and	O
NekoVM	B-Language
bytecode	O
and	O
also	O
runs	O
in	O
interpreted	O
mode	O
.	O
</s>
<s>
Haxe	B-Language
supports	O
externs	O
(	O
definition	O
files	O
)	O
that	O
can	O
contain	O
type	O
information	O
of	O
existing	O
libraries	O
to	O
describe	O
target-specific	O
interaction	O
in	O
a	O
type-safe	O
manner	O
,	O
like	O
C++	B-Language
header	B-Language
files	I-Language
can	O
describe	O
the	O
structure	O
of	O
existing	O
object	B-Application
files	I-Application
.	O
</s>
<s>
This	O
enables	O
to	O
use	O
the	O
values	O
defined	O
in	O
the	O
files	O
as	O
if	O
they	O
were	O
statically	O
typed	O
Haxe	B-Language
entities	O
.	O
</s>
<s>
Many	O
popular	O
IDEs	O
and	O
source	B-Application
code	I-Application
editors	I-Application
have	O
support	B-Application
available	I-Application
for	I-Application
Haxe	I-Application
development	I-Application
.	O
</s>
<s>
No	O
particular	O
development	O
environment	O
or	O
tool	O
set	O
is	O
officially	O
recommended	O
by	O
the	O
Haxe	B-Language
Foundation	I-Language
,	O
although	O
VS	B-Language
Code	I-Language
,	O
IntelliJ	B-Language
IDEA	I-Language
and	O
HaxeDevelop	O
have	O
most	O
support	O
for	O
Haxe	B-Language
development	O
.	O
</s>
<s>
Development	O
of	O
Haxe	B-Language
began	O
in	O
October	O
2005	O
.	O
</s>
<s>
Haxe	B-Language
1.0	O
was	O
released	O
in	O
April	O
2006	O
,	O
with	O
support	O
for	O
Adobe	B-Operating_System
Flash	I-Operating_System
,	O
JavaScript	B-Language
,	O
and	O
NekoVM	B-Language
programs	O
.	O
</s>
<s>
Support	O
for	O
PHP	B-Application
was	O
added	O
in	O
2008	O
,	O
and	O
C++	B-Language
was	O
added	O
in	O
2009	O
.	O
</s>
<s>
More	O
platforms	B-Device
such	O
as	O
C#	B-Application
and	O
Java	B-Device
were	O
added	O
with	O
a	O
compiler	B-Language
overhaul	O
in	O
2012	O
.	O
</s>
<s>
Haxe	B-Language
was	O
developed	O
by	O
Nicolas	O
Cannasse	O
and	O
other	O
contributors	O
,	O
and	O
was	O
originally	O
named	O
haXe	B-Language
because	O
it	O
was	O
short	O
,	O
simple	O
,	O
and	O
"	O
has	O
an	O
X	O
inside	O
"	O
,	O
which	O
the	O
author	O
asserts	O
humorously	O
is	O
needed	O
to	O
make	O
any	O
new	O
technology	O
a	O
success	O
.	O
</s>
<s>
Haxe	B-Language
is	O
the	O
successor	O
to	O
the	O
open-source	O
ActionScript	B-Operating_System
2	O
compiler	B-Language
MTASC	B-Operating_System
,	O
also	O
built	O
by	O
Nicolas	O
Cannasse	O
and	O
is	O
released	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
version	O
2	O
or	O
later	O
.	O
</s>
<s>
The	O
Haxe	B-Language
language	O
can	O
compile	B-Language
into	O
bytecode	O
that	O
can	O
be	O
executed	O
directly	O
by	O
the	O
virtual	B-Architecture
machines	I-Architecture
it	O
targets	O
.	O
</s>
<s>
It	O
can	O
compile	B-Language
to	O
source	O
code	O
in	O
C++	B-Language
,	O
JavaScript	B-Language
,	O
PHP	B-Application
,	O
C#	B-Application
,	O
Java	B-Device
,	O
Python	B-Language
,	O
and	O
Lua	B-Language
.	O
</s>
<s>
Haxe	B-Language
also	O
has	O
an	O
interpreter	O
called	O
eval	O
.	O
</s>
<s>
This	O
same	O
interpreter	O
is	O
also	O
used	O
compile-time	O
to	O
run	O
macros	O
,	O
which	O
allow	O
modification	O
of	O
the	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
(	O
AST	O
)	O
.	O
</s>
<s>
This	O
strategy	O
of	O
compiling	B-Language
to	O
multiple	O
source	O
code	O
languages	O
is	O
inspired	O
by	O
the	O
write	O
once	O
,	O
run	O
anywhere	O
paradigm	O
.	O
</s>
<s>
Typical	O
Haxe	B-Language
programs	O
run	O
identically	O
on	O
all	O
platforms	B-Device
,	O
but	O
developers	O
can	O
specify	O
platform-specific	O
code	O
and	O
use	O
conditional	B-Application
compilation	I-Application
to	O
prevent	O
it	O
from	O
compiling	B-Language
on	O
other	O
platforms	B-Device
.	O
</s>
<s>
The	O
Haxe	B-Language
compiler	B-Language
is	O
an	O
optimizing	B-Application
compiler	I-Application
,	O
and	O
uses	O
field	O
and	O
function	O
inlining	O
,	O
tail	B-Language
recursion	I-Language
elimination	I-Language
,	O
constant	O
folding	O
,	O
loop	B-Operating_System
unrolling	I-Operating_System
and	O
dead	O
code	O
elimination	O
(	O
DCE	O
)	O
to	O
optimize	O
the	O
run-time	O
performance	O
of	O
compiled	B-Language
programs	O
.	O
</s>
<s>
The	O
Haxe	B-Language
compiler	B-Language
offers	O
opt-in	O
null-safety	B-Application
,	O
it	O
checks	O
compile-time	O
for	O
nullable	O
values	O
.	O
</s>
<s>
In	O
Haxe	B-Language
,	O
supported	O
platforms	B-Device
are	O
known	O
as	O
"	O
targets	O
"	O
,	O
which	O
consist	O
of	O
the	O
following	O
modules	O
:	O
</s>
<s>
The	O
compiler-backends	O
that	O
are	O
responsible	O
for	O
generating	O
the	O
respective	O
code	O
.	O
</s>
<s>
The	O
run-time	O
specific	O
APIs	O
that	O
go	B-Application
beyond	O
the	O
core	O
language	O
support	O
(	O
platform-targets	O
)	O
.	O
</s>
<s>
The	O
following	O
table	O
documents	O
platform	O
and	O
language	O
support	O
in	O
Haxe	B-Language
.	O
</s>
<s>
The	O
Haxe	B-Language
language	O
allows	O
developers	O
to	O
gain	O
access	O
to	O
many	O
platform	O
features	O
,	O
but	O
Haxe	B-Language
is	O
not	O
a	O
full	O
featured	O
engine	O
,	O
they	O
might	O
need	O
frameworks	O
that	O
enable	O
create	O
content	O
for	O
certain	O
platforms	B-Device
.	O
</s>
<s>
The	O
run-time	O
performance	O
of	O
Haxe	B-Language
programs	O
is	O
at	O
comparable	O
speed	O
to	O
handwritten	O
sources	O
.	O
</s>
<s>
Haxe	B-Language
is	O
a	O
general-purpose	O
language	O
supporting	O
object-oriented	B-Language
programming	I-Language
,	O
generic	B-Language
programming	I-Language
,	O
and	O
various	O
functional	B-Language
programming	I-Language
constructs	O
.	O
</s>
<s>
Features	O
such	O
as	O
iterations	B-Algorithm
,	O
exceptions	B-General_Concept
,	O
and	O
code	B-Language
reflection	I-Language
are	O
also	O
built-in	O
functions	O
of	O
the	O
language	O
and	O
libraries	O
.	O
</s>
<s>
Unusual	O
among	O
programming	O
languages	O
,	O
Haxe	B-Language
contains	O
a	O
type	O
system	O
which	O
is	O
both	O
strong	O
and	O
dynamic	O
.	O
</s>
<s>
The	O
compiler	B-Language
will	O
check	O
types	O
implicitly	O
using	O
type	O
inferencing	O
and	O
give	O
compile-time	O
errors	O
,	O
but	O
it	O
also	O
enables	O
the	O
programmer	O
to	O
bypass	O
type-checking	O
and	O
rely	O
on	O
the	O
target	O
platform	O
's	O
dynamic	O
type-handling	O
.	O
</s>
<s>
Haxe	B-Language
has	O
a	O
sophisticated	O
and	O
flexible	O
type	O
system	O
.	O
</s>
<s>
The	O
type	O
kinds	O
it	O
offers	O
are	O
classes	O
,	O
interfaces	B-Application
,	O
function-method	O
types	O
,	O
anonymous	B-Language
types	I-Language
,	O
algebraic	O
data	O
types	O
(	O
called	O
enum	B-Language
in	O
Haxe	B-Language
)	O
,	O
and	O
abstract	O
types	O
.	O
</s>
<s>
Parametric	O
polymorphism	B-Application
is	O
possible	O
with	O
classes	O
,	O
algebraic	O
types	O
and	O
function	O
types	O
,	O
giving	O
the	O
language	O
support	O
for	O
generic	B-Language
programming	I-Language
based	O
on	O
type	O
erasure	O
.	O
</s>
<s>
This	O
includes	O
support	O
for	O
variance	O
in	O
polymorphic	B-Application
functions	I-Application
,	O
although	O
not	O
in	O
type	O
constructors	O
.	O
</s>
<s>
Type	O
checking	O
follows	O
nominal	O
typing	O
with	O
the	O
exception	O
of	O
anonymous	B-Language
types	I-Language
where	O
structural	O
typing	O
is	O
used	O
instead	O
.	O
</s>
<s>
All	O
Haxe	B-Language
code	O
is	O
organized	O
in	O
modules	O
,	O
which	O
are	O
addressed	O
using	O
paths	O
.	O
</s>
<s>
In	O
essence	O
,	O
each	O
.hx	B-Language
file	O
represents	O
a	O
module	O
which	O
may	O
contain	O
several	O
types	O
.	O
</s>
<s>
Classes	O
(	O
keyword	O
class	O
)	O
in	O
Haxe	B-Language
are	O
similar	O
to	O
those	O
in	O
Java	B-Device
or	O
TypeScript	B-Language
.	O
</s>
<s>
Haxe	B-Language
supports	O
the	O
accessors	O
public	O
and	O
private	O
,	O
and	O
more	O
advanced	O
methods	O
for	O
access	O
control	O
that	O
are	O
denoted	O
using	O
annotations	O
.	O
</s>
<s>
Interfaces	B-Application
in	O
Haxe	B-Language
are	O
very	O
similar	O
to	O
those	O
in	O
,	O
for	O
example	O
,	O
Java	B-Device
.	O
</s>
<s>
Haxe	B-Language
supports	O
generic	B-Language
programming	I-Language
.	O
</s>
<s>
Enumerated	B-Language
types	I-Language
are	O
an	O
important	O
feature	O
of	O
the	O
language	O
;	O
they	O
can	O
have	O
type	O
parameters	O
and	O
be	O
recursive	O
.	O
</s>
<s>
They	O
provide	O
basic	O
support	O
for	O
algebraic	O
data	O
types	O
,	O
allowing	O
the	O
inclusion	O
of	O
product	O
types	O
,	O
in	O
a	O
fashion	O
similar	O
to	O
Haskell	B-Language
and	O
ML	B-Language
.	O
</s>
<s>
A	O
switch	O
expression	O
can	O
apply	O
pattern	O
matching	O
to	O
an	O
enum	B-Language
value	O
,	O
allowing	O
for	O
elegant	O
solutions	O
to	O
complex	O
programming	O
problems	O
:	O
</s>
<s>
Examples	O
of	O
parametric	O
enum	B-Language
types	O
are	O
the	O
Haxe	B-Language
standard	O
library	O
types	O
Option	O
and	O
Either	O
:	O
</s>
<s>
Haxe	B-Language
also	O
supports	O
generalized	B-Application
algebraic	I-Application
data	I-Application
types	I-Application
(	O
GADTs	B-Application
)	O
.	O
</s>
<s>
Anonymous	B-Language
types	I-Language
are	O
defined	O
by	O
denoting	O
their	O
structure	O
explicitly	O
,	O
using	O
a	O
syntax	O
that	O
follows	O
the	O
mathematical	O
record-based	O
representation	O
of	O
a	O
type	O
.	O
</s>
<s>
Functions	O
are	O
first-class	O
values	O
in	O
Haxe	B-Language
.	O
</s>
<s>
Their	O
type	O
is	O
denoted	O
by	O
using	O
arrows	O
between	O
argument	O
types	O
,	O
and	O
between	O
the	O
argument	O
type(s )	O
and	O
return	O
type	O
,	O
as	O
common	O
in	O
many	O
functional	B-Language
languages	I-Language
.	O
</s>
<s>
However	O
,	O
unlike	O
in	O
prominent	O
examples	O
like	O
Haskell	B-Language
or	O
the	O
ML	B-Language
language	I-Language
family	O
,	O
not	O
all	O
functions	O
are	O
unary	O
functions	O
(	O
functions	O
with	O
one	O
argument	O
only	O
)	O
,	O
and	O
in	O
Haxe	B-Language
,	O
functions	O
ca	O
n't	O
be	O
partially	B-Application
applied	I-Application
per	O
default	O
.	O
</s>
<s>
The	O
latest	O
addition	O
to	O
the	O
Haxe	B-Language
type	O
system	O
is	O
a	O
concept	O
termed	O
abstract	O
types	O
.	O
</s>
<s>
As	O
used	O
in	O
Haxe	B-Language
,	O
this	O
refers	O
to	O
something	O
different	O
from	O
a	O
conventional	O
abstract	O
type	O
.	O
</s>
<s>
Haxe	B-Language
can	O
automatically	O
convert	O
miles	O
to	O
kilometers	O
,	O
but	O
not	O
the	O
reverse	O
.	O
</s>
<s>
In	O
many	O
functional	B-Language
programming	I-Language
languages	I-Language
,	O
structural	O
typing	O
plays	O
a	O
major	O
role	O
.	O
</s>
<s>
Haxe	B-Language
employs	O
it	O
in	O
the	O
presence	O
of	O
anonymous	B-Language
types	I-Language
,	O
using	O
the	O
nominative	O
typing	O
of	O
object-oriented	B-Language
programming	I-Language
,	O
when	O
only	O
named	O
types	O
are	O
involved	O
.	O
</s>
<s>
Anonymous	B-Language
types	I-Language
in	O
Haxe	B-Language
are	O
analogous	O
to	O
the	O
implicit	O
interfaces	B-Application
of	O
the	O
language	O
Go	B-Application
as	O
to	O
typing	O
.	O
</s>
<s>
In	O
contrast	O
with	O
Go	B-Application
interfaces	B-Application
,	O
it	O
is	O
possible	O
to	O
construct	O
a	O
value	O
using	O
an	O
anonymous	B-Language
type	I-Language
.	O
</s>
<s>
The	O
Haxe	B-Language
compiler	B-Language
is	O
divided	O
into	O
one	O
frontend	O
and	O
multiple	O
backends	O
.	O
</s>
<s>
The	O
frontend	O
creates	O
an	O
abstract	B-Data_Structure
syntax	I-Data_Structure
tree	I-Data_Structure
(	O
AST	O
)	O
from	O
the	O
source	O
code	O
,	O
and	O
performs	O
type	O
checking	O
,	O
macro	O
expansion	O
,	O
and	O
optimization	O
on	O
the	O
AST	O
.	O
</s>
<s>
The	O
various	O
backends	O
translate	B-Language
the	O
processed	O
AST	O
into	O
source	O
code	O
or	O
generate	O
bytecode	O
,	O
depending	O
on	O
their	O
target	O
.	O
</s>
<s>
The	O
compiler	B-Language
is	O
written	O
in	O
OCaml	B-Language
.	O
</s>
<s>
It	O
can	O
be	O
run	O
in	O
server-mode	O
to	O
provide	O
code	O
completion	O
for	O
integrated	B-Application
development	I-Application
environments	I-Application
(	O
IDEs	O
)	O
and	O
maintain	O
a	O
cache	O
,	O
to	O
further	O
speed	O
compiling	B-Language
.	O
</s>
