Hacker News new | ask | show | jobs
by zserge 5115 days ago
Haxe is a nice language, though I don't like it's verbosity (hey, it's almost like Java!). Maybe I'm too much spoilt with coffeescript, ruby, python and other syntax-sugary languages.
4 comments

It has very powerful type-inference, which usually makes it far more concise and expressive than Java or AS3...

It may still be a bit more verbose than Coffeescript or Python, but once your code is written you can theorically run it almost anywhere :)

My question is, how do Haxe and NME relate? I started reading about Haxe, started working with the tool, then found all these references to NME which I'm not clear if it's a subset or a fork or ?

Would like to use this for the game I'm working on since the idea of write once, compile everywhere is seductive. Of course I seem to recall that when Java first came out that was supposed to be it's claim to fame...

NME is a library for Haxe.

It basically provides an implementation of the Flash API for the C++ and Javascript targets, besides the SWF target that Haxe offers natively.

It also comes along with tools that allow this generated C++ code to be easily compiled and deployed to Android, iOS, Blackberry and WebOS devices.

So, if you write an app that targets Flash Player using Haxe, you can use NME to deploy to all these targets with no modification to your code.

This is really what has kept me from giving Haxe a try so far. It's just extremely painful to go back to curly braces and semicolons after years of writing noise-free code with e.g. Python, CoffeeScript and Haskell.

I know it sounds superficial, but I'd love a CoffeeScript-like alternative syntax for Haxe. That would probably elevate it to the number one language choice for game programming for me.

Hey, it has macros! But it doesn't compile to coffeescript ... yet ...

http://haxe.org/manual/macros

What's the point of compiling to CoffeeScript when it compiles to JavaScript ?
Because trendy technologies.
Coffeescript is webscale.
I guess it could be useful if you wanted to switch from HAXE to Coffeescript.
It could be fun to have a CoffeeScript to Haxe converter, though.
Infinite loop of compilation! Haha
What would you do after compiling to coffeescript other than compile to javascript? It's not like you can persist changes that you make to the compiled coffeescript result between compiles.