This is a comparison of Skew (http://skew-lang.org) to Haxe (http://haxe.org). Skew is a programming language I've been working on. Haxe is a great language and ecosystem but the JavaScript code that the Haxe compiler generates isn't as good as it could be and the language itself could be better. Here's a quick list of some things that Skew is better at:
Things the Skew compiler has that Haxe doesn't:
- Actual integers (Haxe uses doubles)
- Automatic inlining (Haxe needs "inline" everywhere)
- Dead code elimination (the Haxe compiler emits unused inlined getters)
- Property minification (must manually specify minified names with @:native in Haxe)
- Comment preservation (the Haxe compiler strips all comments from the debugging output)
- Local constant folding (can't specify a local variable as "inline" in Haxe)
- Smaller output (7x in this case, 2.8x with minification using uglify)
Things the Skew language has that Haxe doesn't:
- Function overloading
- Top-level functions
- Much lighter syntax
Obviously Skew has a long way to go, but it's just getting started and it already generates much better JavaScript than Haxe!
Your review need few adjustments (I only scratch the surface, I'm not an Haxe expert):
To transpile Haxe and remove dead code of inlining use
-dce full
http://try.haxe.org/#8B6d9 + https://marijnhaverbeke.nl/uglifyjs now give 751 chars.
Also be careful, the output of Skew release don't have "strict mode", and asserts() are removed. That means the result is not compatible (and Haxe provide a "fallback" to
console.log
).