Haxe
, commonly pronounced "hex" or "hacks" is a language that targets many virtual machines, instead of the more common virtual machine that targets many languages.It has a reasonable standard library that feels designed, much like Python's. The syntax is Go like, with identifiers following names:
class WebFetch
{
static function main()
{
var output = haxe.Http.requestUrl("http://www.google.com/");
Sys.print(output);
}
}
When built, this program is a ~68Kb JAR file when targeting Java or a 550Kb ELF when generating C++.Compilation is straightforward, consisting of an internal build system that resolves libraries well, and a global repository that you can pull new packages from.
One of the biggest benefits of this language is its ability to compile and run on so many platforms; it easily handles:
- Android
- Flash
- Linux
- Mac
- Windows
- HTML + JS
- PHP
- Java (in Beta)
Example Uses
- You're a web-developer and have some business code that needs to target language of the day. Haxe can compile to language of the day without the need to translate.
- You want to code a cross-platform game to reach as broad of an audience as possible without re-writing lots of code.
- You want to develop a client for an API you publish so developers will actually use it without learning all of the languages it is going to be used in or maintaining the libraries.
- You want to develop an app that is future proof, but don't mind it being a little ugly.
Pitfalls
- There is no standardized UI system.
- The coding conventions are a strange to begin with.
- There are some obvious deficiencies in the standard library (no string compare)
- Code is slightly larger than it would be natively.
No comments:
Post a Comment