Haxe值得学习吗? [英] Is Haxe worth learning?
问题描述
对于在那里使用 Haxe 的人来说,它对您有用吗?阅读该网站看起来很有希望.它提供了显着的可移植性吗?
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?
陷阱或陷阱是什么?
推荐答案
Haxe值得学习吗?
Is Haxe worth learning?
简短的答案是:绝对!
对于使用Haxe的人们来说,它对您有用吗?
For people out there using Haxe, what makes it useful for you?
如果您是Web开发人员,则知道您不能坚持使用单一技术太长时间.迟早,您将不得不应对环境或目标的变化(您为.NET开发,但重要的客户需要PHP,或者该小部件应该在Flash中而不是Javascript中),这是最好的情况.在最坏的情况下,您将不得不在同一工作日内不断进行切换,通常需要多次切换.
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.
这些开关可能会浪费您很多时间,因为您需要太多次更改编程范例,并且可能因为在为特定目标编写库时会有很多重叠. Haxe尝试通过仅使用一种源语言(Haxe语言)和许多输出(通过Haxe编译器)来减轻过渡的痛苦.无论您的背景如何,该语言都非常友好且易于学习.
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?
无论部署到什么平台,语言都是相同的.因此,您可以用与JS,Flash,C ++等相同的方式定义类/接口/枚举/类型定义.如果您定义的那些类型不依赖于特定的平台API,则可以毫不费力地在各个平台之间重用它们. .所有平台还共享通用API,例如XML访问,HTTP连接和反射.具有共同点的平台(例如Neko和PHP)共享相同的API,用于文件访问或网络服务器开发.
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语言完全相同.
- If you are experienced with Flash/Flex you know how the compiler can slow down your work (the only advantage is being able to take a coffee break while waiting ;) ). The Haxe compiler is many times faster, so fast that most of the time you don't even notice it working.
- The bytecode produced is much faster than the equivalent produced by Adobe tools.
- Also in the Flash realm, Haxe can "inline" functions or access the Memory features that are only available elsewhere by using Alchemy.
- In case you need it, you can also decide what version of Flash to target, from 6 to 10; the API has changed a lot but the Haxe language is exactly the same.
-
Haxe is young and immature
并非如此,Haxe已有将近4年的历史,已经看到25个正式发行版(而非内部版本)+ 13个Alpha和Beta版,并且会不断更新,并且拥有一个专门的社区.许多开发领域的很多人专业地使用它.查看邮件列表档案,以了解人们如何使用Haxe. Haxe is young and immature
Not really, Haxe is almost 4 years old now, has seen 25 formal releases (not builds) + 13 alphas and betas, it is updated constantly and has a very dedicated community. It is used professionally by a lot of people in several development areas; take a look at the mailing list archive to find how people use Haxe.
谈到服务器端,我们都知道PHP是无处不在的.您可以使用Haxe开发针对性的应用程序,并且如果您的Web应用程序可以扩展,则可以扩展到Neko甚至C ++.
Talking about the server side, we all know how ubiquitous PHP is. You can develop an application with Haxe targeting it and scale to Neko or even C++ if your web application grows.
陷阱或陷阱是什么?
What are the pitfalls or gotchas?
以下是常见的误解列表:
Here's a list of common misconceptions:
Haxe is complicated
因为Haxe的主要目标是毫无疑问的AS3,所以人们希望它必须具有向导或GUI.如前所述,Haxe是一种语言和编译器,使其适合程序员,但对设计师而言却不是很好.
Haxe is complicated
Because the main target of Haxe is without any question AS3, people expect that it must have wizards or a GUI. As stated Haxe is a language and a compiler which makes it suitable for programmers but not very good for designers.
There aren't any IDEs
真正的部分是可以在很多方面改进IDE以更好地与Haxe集成,但是已经有很多
There aren't any IDEs
The true part of this is that IDE could be improved in a lot of aspects to better integrate with Haxe but there are already a lot of valid options.
The only book published is already outdated
这里也有一些道理,不幸的是,这本书在主要发行版本(从V1到V2)出现之前的几个月才出版.该主要版本并没有太大变化,但确实增加了一些不兼容性.这本书仍然是一个有效的资源(我并不是仅仅因为我写了它才说这句话;))
The only book published is already outdated
There is some truth here too, unfortunately the book was published just a few months before a major release occurred (from V1 to V2). That major release didn't change much, but it did add a few incompatibilities. The book still remains a valid resource (I'm not just saying that because I wrote it ;) )
这篇关于Haxe值得学习吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!