Is Haxe worth learning? [closed] Ask Question

Is Haxe worth learning? [closed] Ask Question

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?

ベストアンサー1

Is Haxe worth learning?

The short answer is: Absolutely!

For people out there using Haxe, what makes it useful for you?

If you're a web developer, you know you can't stick with a single technology for too long. Sooner or later you'll have to deal with changes in the environment or targets (you develop for .NET but an important customer requires PHP, or maybe that widget should be in Flash not Javascript), and this is the best case scenario. In the worst case you'll have to switch constantly, often multiple times in the same business day.

Those switches can waste a lot of your time because you need to change your programming paradigm too many times and possibly because you will have a lot of overlaps in coding your libraries for specific targets. Haxe tries to ease the pain of transition by having just one source language (the Haxe language) and many outputs (through the Haxe compiler). The language is very friendly and quite easy to learn, no matter your background.

Reading the website it looks very promising. Does it provide significant portability?

The language is the same no matter what platform you deploy to. So you define classes/interfaces/enums/typedefs in the same way for JS, Flash, C++, etc. If those types you define do not depend on a specific platform API, they can be reused from platform to platform with no effort at all. All the platforms also share common APIs like XML access, HTTP connections and reflection. Platforms that have things in common (i.e. Neko and PHP) share the same API for things like file access or web-server development.

What are some real world and perhaps under appreciated advantages?

  • Flash/Flex の経験があれば、コンパイラが作業を遅くする可能性があることをご存知でしょう (唯一の利点は、待っている間にコーヒーブレイクが取れることです ;) )。Haxe コンパイラは数倍高速で、非常に高速であるため、ほとんどの場合、動作していることに気付かないほどです。
  • 生成されるバイトコードは、Adobe ツールによって生成される同等のバイトコードよりもはるかに高速です。
  • また、Flash 領域では、Haxe は関数を「インライン化」したり、Alchemy を使用して他の場所でのみ利用可能なメモリ機能にアクセスしたりできます。
  • 必要に応じて、ターゲットとする Flash のバージョンを 6 から 10 まで決定することもできます。API は大きく変更されていますが、Haxe 言語はまったく同じです。

サーバー側について言えば、PHP がいかに普及しているかは誰もが知っています。Haxe をターゲットにしたアプリケーションを開発し、Web アプリケーションが成長したら Neko や C++ に拡張することができます。

落とし穴や注意点は何ですか?

よくある誤解のリストは次のとおりです。

  • Haxe is young and immatureいいえ、Haxeはもうすぐ4年になります。25回の正式リリース(ビルドではありません)と13回のアルファ版およびベータ版があり、常に更新されており、熱心なコミュニティがあります。さまざまな開発分野で多くの人が専門的に使用しています。メーリングリストアーカイブ人々が Haxe をどのように使用しているかを知るためです。

  • Haxe is complicatedHaxe の主なターゲットは間違いなく AS3 であるため、ウィザードや GUI が備わっているはずだと人々は予想します。前述のように、Haxe は言語でありコンパイラーであるため、プログラマーには適していますが、デザイナーにはあまり適していません。

  • There aren't any IDEs本当のところ、IDEはHaxeとの統合をより良くするために多くの面で改善できるが、すでに多くの有効なオプション

  • The only book published is already outdatedここにもいくらか真実が含まれています。残念ながら、この本はメジャー リリース (V1 から V2) が行われる数か月前に出版されました。そのメジャー リリースではあまり変更はありませんでしたが、いくつかの非互換性が追加されました。この本は今でも有効なリソースです (私が書いたからそう言っているわけではありません ;) )

おすすめ記事