Student Impressions of haXe

Two of the students in this term's consulting course, Robert Beghian and Tom Plaskon, spent the term working with haXe. Their impressions of it are below... HaXe is a high-level, object-oriented programming language for the development of web applications. Programs written in haXe can be compiled on several platforms including Javascript, Flash, and Neko. For this reason the official website calls haXe the "web oriented universal language." HaXe's syntax is similar to the Java and ActionScript syntaxes. However, despite these promising characteristics, haXe has many drawbacks. I will focus on three areas in my critique of haXe: documentation, tool support, and libraries. The API documentation on the official haXe website is difficult to find and incomplete. The API documentation is not even present on the top-level navigation of the website (even though there is clearly enough room). To find the API one must scroll through dozens of screens on the reference page, to find the link to it at the very bottom (with no prior mention that it is even present there). Many of the API pages are completely without any explanatory text. The methods provided by a library are merely listed, leaving one wondering what their function is, and what the purpose of the library is. There is very little in the way of documentation offered anywhere other than the official site. Even worse, Amazon only lists a single book on haXe. The product information page details the book as having 600 pages. It would be helpful if the entire haXe website provided 100 hundred pages of documentation, especially considering is not available elsewhere. The tool support in haXe is very poor. Although there is a Eclipse plugin for haXe it barely adds any functionality at all. It does not support the opening of definitions nor does it even have a hot-key for compilation. This has to be done using the context menu on the project. However, these are fairly minor issues in comparison to the biggest shortfall of the tool support for haXe, namely, that it does not have a symbolic debugger! The only method of debugging a haXe program is to catch exceptions and print them with trace statements. Furthermore, exceptions are not even automatically caught at the top of the execution stack, so if an exception does get that far, the programmer will simply be displayed a blank, white screen. Even Javascript has an error console built-in to every modern browser. Lastly, I would like to discuss haXe's libraries. The standard library contains only the most basic of XML support, allowing you to parse an XML string into a tree, and navigate this tree using the familial attributes of a node (parent and children). There is no built in support for any of the W3C DOM features, including even the lack of getElementById and getElementsByTagName functions. There is only a single library, by Daniel Cassidy, which implements the XPath W3C standard. This library is in an alpha state and although I could find the documentation for it, I could not find out where to download the library. In comparison, Python has several XML libraries (PyXML, libxml2, ElementTree, and 4suite) all of which have full XPath support. Web programmers expect a language to have excellent XML support. The official haXe website lists twenty-one libraries. Ten of these libraries are by two authors. That is to say, nearly 50% of the all libraries listed on the official website were committed by two programmers. Thankfully, there is a standard MySQL library, or I would say that would be the killing blow for the mainstream use of haXe. Although haXe has many desirable traits (including support for many platforms and familiar syntax) one can only assume that the claim of it being the universal language refers to its multi-platform support and not its pervasiveness. The contributors to the haXe community appear to be few and this shows. In comparison to Python with its endless libraries and PHP with its plethora of user-submitted samples and tutorials (the bottom of every page on contains a wealth of very helpful, user-submitted information), haXe is likely to be found wanting by the average web programmer. HaXe's lack of good documentation makes it difficult for new users to quickly learn, while it's lack of tool support (especially a debugger) and libraries make it difficult to be very productive in.
comments powered by Disqus