Questions tagged [haxe]

Haxe can build cross-platform applications targeting JavaScript, C++, C#, Java, JVM, Python, Lua, PHP, Flash, and allows access to each platform's native capabilities. Haxe has its own VMs (HashLink and NekoVM) but can also run in interpreted mode. Code written in Haxe can be compiled to any target Haxe supports.

Haxe is an open source, multiplatform programming language that allows developers to JavaScript, C++, C#, Java, JVM, Python, Lua, PHP, Flash, NekoVM and HashLink using the same syntax.

Haxe includes a set of common functionality that is supported across all platforms, such as numeric data types, text, arrays, binary and some common file formats. Haxe also includes platform-specific APIs. It can be integrated with existing libraries using extern definitions (e.g: JavaScript) or leveraging the compiler to connect directly to native libraries (e.g: .jar for Java and .dll for C#).

Haxe can also compile to bytecode (Neko, HashLink or JVM), which runs in the runtime created by the same developer.

Haxe is a garbage-collected language. Some target platforms do not have a native garbage collector - in those cases Haxe provides its own runtime, like in the case of C++, to take care of GC and other things.

Haxe ships with its own package manager called .

Haxe was developed by Nicolas Cannasse and other contributors and is backed by the Haxe Foundation. It was named Haxe because it was short, simple, and "has an X inside", which the author humorously asserts is necessary to make any new technology a success. Haxe is pronounced "hex" /heks/, although many community members pronounce it "hacks".

Haxe is known for its multitude of game development and multimedia libraries. With frameworks like , or built on top of Haxe, developers can target platforms like:

All from a single code base.

Popular game engines include , , and . The powerful physics engine is written in Haxe as well.

With UI frameworks like and , user interfaces can be created for a wide range of target platforms. With , there is also a feature-rich MVC web framework available. To create reactive web applications using a virtual DOM, coconut.ui can be used, which shares significant similarities with .

1627 questions
158
votes
11 answers

Is Haxe worth learning?

For people out there using Haxe, what makes it useful for you? Reading the website it looks very promising. Does it provide significant portability? What are some real world and perhaps under appreciated advantages? What are the pitfalls or gotchas?
Gordon Potter
  • 5,802
  • 9
  • 42
  • 60
38
votes
2 answers

Running Haxe from iOS app – hxRunLibrary() error

For a client I've developed an iOS + Android app using Cordova (PhoneGap) for the user interface. Now, as an update to this app, I'm am attempting to add a game that was written in Haxe. Originally the game was written for the Flash target, but I've…
Splashdust
  • 787
  • 5
  • 8
33
votes
8 answers

Haxe in the field

I had a fresh look at Haxe again recently and realized that I had overlooked some of its elegance before. But I guess it lacks some visibility among the developers still. So my question is, does anybody here use it for production? If so, how do you…
artificialidiot
  • 5,309
  • 29
  • 27
29
votes
3 answers

What is Neko anyway?

I have started to use Haxe to convert my ActionScript 3 projects into NME, but, I like to know please what is Neko in the world of Linux? I searched for it, I found its an animated cat! Can any one please explain to me?
simo
  • 23,342
  • 38
  • 121
  • 218
28
votes
4 answers

JavaScript constructs/patterns to avoid on iOS Safari?

I have a web app that contains a huge amount of generated JavaScript. The memory consumption differs by a factor 6 between running the web app in Chrome on a Desktop compared to running the web app in a UIWebView on an (updated) iPad. What…
jpsecher
  • 4,461
  • 2
  • 33
  • 42
28
votes
1 answer

How can I iterate Dynamic object in Haxe

I have Object parsed from JSON (haxe.Json.parse()) and I need to iterate over it. I already tried to cast this object to Array: var data:String='{"data":{"0":0,"1":1},"method":"test"}'; var res:{method:String,data:Array} =…
Igor Bloom
  • 320
  • 3
  • 9
26
votes
5 answers

Actionscript 3 vs Haxe: Which to chose for new Flash project?

I am in the planning stages of a new Flash game project and was wondering which language would be better to use? I already have a strong understanding of Actionscript 3, and have not worked with Haxe yet, but I have read the language reference docs…
Jason Miesionczek
  • 14,268
  • 17
  • 76
  • 108
22
votes
2 answers

Haxe / OpenFL / Flixel

I've been looking through the sites of Haxe / OpenFL / Flixel but am struggling to understand what each one is for. As I understand it: Haxe is a language that can be deployed to multiple platforms. OpenFL is something to do with Flash. Flixel is a…
panthro
  • 22,779
  • 66
  • 183
  • 324
20
votes
2 answers

Dart vs Haxe - Current state, hype, usability, ...?

Recently I've been looking for new (al least for me new) ways to make web apps. And I found two languages that seems very promising. Google Dart and Haxe. Both can compile to javascript, so they should both work on all browsers. Now, my question is,…
The Oddler
  • 6,314
  • 7
  • 51
  • 94
17
votes
11 answers

'cp' is not recognized as an internal or external command

I tried to run a project using custom build in FlashDevelop: $(CompilerPath)\haxe.exe $(ProjectDir)\compile-js.hxml , but I get this error: 'cp' is not recognized as an internal or external command, here is the compile-js.hxml file, is there any…
simo
  • 23,342
  • 38
  • 121
  • 218
16
votes
7 answers

Minify / Obfuscate PHP Code

I use Haxe to generate PHP code. (This means you write you code in the Haxe language and get a bunch of php files after compiling.) Today a customer told me that he needs a new feature on a old project made with Haxe. He also told me that he altered…
TheHippo
  • 61,720
  • 15
  • 75
  • 100
16
votes
1 answer

Opa vs Dart vs Haxe vs CoffeeScript

I've been googling for latest web apps, and found the following languages: - Opa - Dart - Haxe - CoffeeScript Since these languages are new, there are not many information available. Can anyone explain the advantages and disadvantages of these…
Gokul Nath KP
  • 15,485
  • 24
  • 88
  • 126
15
votes
1 answer

How do I iterate over an enum in Haxe?

I have an enumerator type: enum PlayerProps { Attempts; Gold; Diamonds; } What should I do to iterate through all enum values? Something like: var props = new Map(); for (prop in PlayerProps) props[prop] = 0;
meps
  • 579
  • 2
  • 17
15
votes
5 answers

How to declare 2D arrays in Haxe?

In other programming languages, I can use int array[23][23] to declare a 2D array with 23 elements in each dimension. How do I achieve the same thing in Haxe? Currently I need to do this: var arr:Array> = [[0, 0, 0], [0, 0, 0], [0, 0,…
sub_o
  • 2,642
  • 5
  • 28
  • 41
14
votes
1 answer

Proper Uses for Abstracts

Just yesterday, I decided to begin learning the Haxe programming language after having used Actionscript 3 for the past few years. Today I have been exploring abstract types, and I have come to realize that they seem quite different from abstract…
1
2 3
99 100