About the Haxe compiler
Compiles to almost anything. Compiled online. Run Haxe code in your browser with no install and no signup — the editor, the input and the output share one screen. Haxe is executed by a remote runtime: your code is submitted to it and the output is returned to this page.
Press Run to execute the program, edit it and press Run again, or paste your own code over it. Everything you type stays in the page; the editor caches your work locally so a reload does not lose it.
A Haxe example
This is the program the Haxe editor opens with — run it as it is, then change it.
class Student {
public var name:String;
public var scores:Array<Int>;
public function new(name:String, scores:Array<Int>) {
this.name = name;
this.scores = scores;
}
public function average():Float {
var sum = 0;
for (s in scores) sum += s;
return sum / scores.length;
}
public function grade():String {
var avg = average();
if (avg >= 90) return "A";
if (avg >= 80) return "B";
if (avg >= 70) return "C";
return "D";
}
}
class Main {
static function main() {
var students = [
new Student("Alice", [92, 88, 95]),
The editor opens with the full program.
More Functional compilers
Browse all 109 languages — the same editor runs each of them, in the browser or on a shared runner.