Recs.
Updated
SpecsUpdate
Pros
Pro Able to transpile into multiple language targets with one code base
Haxe allows you to develop for Web, iOS, Android, Blackberry, Windows, OSX, Linux and others, all at once, without the need to switch languages and maintain separate code bases.
This is possible because Haxe can compile to JavaScript, ActionScript, Flash AVM bytecode, C++, Neko, PHP, C# (.NET) and Java.
Support for even more platforms and languages is under development.
Pro Static extension
It's like monkeypatching on a new method, but without the dangers, since it's only effective locally. It's just syntactic sugar for a function call, but nice to have, since it can change deeply nested function calls into method chains, e.g. f(g(h(x)))
to x.h().g().f()
Pro Syntax transformation macros
Macros gives Haxe abstraction power approaching that of Lisp, though they're not as easy to write in Haxe.
Pro Everything is an expression
There's no useless statement/expression distinction like some languages. In Haxe, everything is an expression
Pro Create without needing to be limited to a language, target, or commercial ecosystem
Pro Abstracts allow you to create more intative api's without runtime overhead
Pro Can create complex applications without needing webpack, npm or other crutchest
Haxe has the power and expression to not need the npm dependancy hell that is common in js and typescript, but it's still simple.
Pro Small, readable output
The output that is generated can be trimmed using "dead code elimination" to only include those functions and libraries that are strictly necessary. All code is very readable with only minimal extras for specific functionality.
Small output is good for frontend development as file size is a major concern.
Pro Large library support, from servers to games
Haxelib (common library repo) and other sources contain large codebases for anything from cryptography to communications. A lot of these are fully cross platform and work with the JavaScript target.
The JavaScript target can be used for everything from node.js server applications (with code completion) to games using either the Flash-like OpenFL library or direct canvas or WebGL programming.
Pro Ability to use existing JS libraries
Haxe has the ability to use "externs". These are haxe files which describe the usage of existing JS libraries. Get code completion and compile-time-checking for everything from jQuery to Node.js.
Even without externs, native JS code can still be used through untyped code.
Pro Syntactic macros
Syntactic macros allow you to extend compiler features at the syntax tree step. Macros come into play after code is parsed into the abstract syntax tree, and macros allow you to transform it before the rest of the compilation completes.
This provides for immense power, while at the same time scoping the extensibility at a level that is powerful, but well constrained.
Pro Pick up errors at compile time
One big advantage over pure javascript, (or some other languages listed here) is that Haxe will pick up a whole range of errors when you compile, saving you the pain of having to try and debug them later. This includes everything from syntax errors ("Unexpected ;") to type errors ("Class user has no field username. Suggestion: username").
Pro Familiar syntax
Haxe's syntax was largely derived from ActionScript, which itself was derived from JavaScript, which was designed to look familiar to the lowest common denominator C/C++/Java programmer.
Pro Game development
Haxe approaches native performance because it compiles to native code, but (with the proper APIs) is cross-platform. There are a number of game engines available, including the popular cross-platform HaxeFlixel 2D engine, based on OpenFL (The Open Flash Library--an open-source clone of the Adobe Flash API).
Cons
Con Transpiled source code is mostly unreadable
The source code output by the various Haxe transpilers is generally unreadable.
Recommendations
Comments
Flagged Pros + Cons
Pro Compiles to multiple platforms and languages
Haxe allows you to develop for Web, iOS, Android, Blackberry, Windows, OSX, Linux and others, all at once, without the need to switch languages and maintain separate code bases.
This is possible because Haxe can compile to JavaScript, ActionScript, Flash AVM bytecode, C++, Neko, PHP, C# (.NET) and Java.
Support for even more platforms and languages is under development.