HaXe
From Wikipedia, the free encyclopedia
- The correct title of this article is haXe. The initial letter is shown capitalized due to technical restrictions.
haXe is a general-purpose, high-level, reflective, object oriented programming language developed by Nicolas Cannasse. It is possible to write both client and server layers of program in haXe, compiling client layer as Flash or JavaScript and server layer as Neko bytecode.
Contents |
[edit] Main Features
- The haXe Type System is strictly typed, enabling the compiler to detect most errors at compile-time. At the same time, it’s very different from classic strictly typed languages since you don’t have to write types everywhere in your program, thanks to type inference.
- haXe is bundled with The haXe Standard Library, which includes components designed to behave the same across all platforms.
- haXe is easily extendable. One can add additional libraries and wrappers for platform-specific features. Thanks to conditional compilation it is possible to have different implementation for a given API depending on the platform you want to compile to.
- haXe syntax is similar to Java and ECMAScript, so it should be very familiar to JavaScript/ActionScript programmers. Yet it brings powerful features from other languages such as Generics and Algebraic data types.
- haXe can be run in Apache by using mod_neko. mod_neko is available on Windows, Linux, Mac OS X and BSD systems.
[edit] For Flash developers
- haXe scripts can compile into a .swf file for the Adobe Flash Player, versions 6 through 9.
- haXe, like Actionscript, is based on ECMAscript, so the two languages should have similar syntax.
- haXe has automatic delegate creation, which was a large problem for new developers using Actionscript 1 and 2.
[edit] For JavaScript developers
- haXe comes with all of the DHTML APIs that are needed, with some additional classes that reduce the number of cross-browser incompatibilities
- haXe has a full-featured type system, so it is not necessary to test every bit of JavaScript to check if the program is correct or not, saving hours of Console Debugging.
- Simply run the haXe compiler and it will output a single .js file to include in a website.
[edit] Similar languages
Other programming languages operate in the same domain as haXe. Only a few, like Links and Hop, cover both the server and client side with the same language and API like haXe - avoiding most of the impedance mismatch problem. For the client side, alternatives include JavaScript interpreted directly by the browser, and ActionScript, OpenLaszlo and Neoswiff which all target the Flash platform. On the server side, typical Server-side scripting languages can be considered, as well as J2EE, Ruby on Rails, and more.
[edit] External links
[edit] General information about haXe
- haXe Home
- haXe Documentation
- haXe API Reference
- haXe Entry on Yariv's Blog A good introduction