How to learn Haxe as a JavaScript developer

梦想的初衷 提交于 2019-12-10 17:37:55

问题


I have been using JS for like 3 years. I want to use OpenFL for making mobile apps. However, I do not know Haxe. And I don't know other programming languages either. However, I am comfortable in learning classes, inheritance, etc....

Also, so far from what I have read, OpenFL is better than Adobe AIR in terms of performance and you need to know Haxe to use OpenFL.

So how can I get started? Are there any good resources? All seem to be tailored toward AS3 developers.

Do I need to understand Flash before i can get into Haxe?


回答1:


Haxe and OpenFL in general ARE tailored for Flash developer to access more advanced features and improved performance.

While in time of NME most classes had same name as Flash, but a different package. Now, OpenFL has the same packages, class names, methods etc.

Haxe has a very similar syntax to AS3 (and therefore similar to all ECMAscript languages), the only few differences are:

  • Casts
  • Contructors
  • For Loops

and many minor things, like absence of uint, Number is known as Float etc, semicolon is mandatory.

Feel free to look into ActionScript 3, and you'll be able to just right into Haxe development with no problem. Except the differences listed above there are really few differences for beginner, mid-level developers.

In general Haxe is richer as a language, but as some small features that are present in as3 but missing in Haxe (e.g.: no labels for loops, blocks and if statements)



来源:https://stackoverflow.com/questions/20929243/how-to-learn-haxe-as-a-javascript-developer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!