Hacker News new | ask | show | jobs
by jdonaldson 5114 days ago
First, a distinction between frameworks and languages... Framework benefits include rapid development, and familiarity (since they use preexisting languages). The cost is that performance will never be as good as native code, and you won't be able to easily change certain behaviors.

The Haxe language gives you far more flexibility and performance optimizations, since it is generating optimized native source or byte code. The cost is that you have to learn the Haxe language.

Many people on this discussion are criticizing the java-style syntax of Haxe. I think most of these negative feelings are due to the excessive boilerplate required for many Java classes. Haxe does away with a lot of boilerplate code using type inference and other modern compiler techniques. http://haxe.org/ref/type_infer

You can remove even more boilerplate with macro libraries for shorthand class declarations: https://github.com/back2dos/tinkerbell/wiki/tink_lang

There are many other tricks you can use to define behavior without resorting to complex inheritance or class definitions. One of my favorites is the "using" declaration: http://haxe.org/manual/using

So, in my opinion, the cost of learning Haxe is very low if you already know Java or Actionscript. The cost of coding/writing Haxe is also very low, since you're not required to write boilerplate code.

Finally, it's worth mentioning that the Haxe developers are not just trying to gloss over the technicalities of each underlying platform in order to get things working. They really understand the behavior of each platform, and make many conscientious decisions based on considerations for performance and cross-platform consistency. I've learned more from the Haxe language google group about each target (js quirks, java limitations, etc.) than I have from the Java, JS, Actionscript groups themselves: https://groups.google.com/forum/#!forum/haxelang Many people have remarked that simply following the Haxe development list has made them a better programmer.