
Eval – The new Haxe macro interpreter - markknol
https://haxe.org/blog/eval/
======
jdonaldson
Eval here is important because of Haxe's incredible macro system. The "eval"
target is the engine for macro AST transformations. While vanilla haxe was
extremely fast to compile, including macros in a project would often make haxe
development feel sluggish. There were various workarounds for these
situations, but those added to the mental overhead of managing the project.
The eval target improvement streamlines this part of the compiler, bringing it
in line with the rest of the compiler performance characteristics.

The overview for macros is here :
[https://haxe.org/manual/macro.html](https://haxe.org/manual/macro.html)

Some examples of macro usage are here :
[http://code.haxe.org/category/macros/](http://code.haxe.org/category/macros/)

------
Cyph0n
Slightly off-topic.

I've always been curious about Haxe, especially since there really is nothing
quite like it out there. Does anyone have experiences or opinions to share on
developing applications (e.g., games) using Haxe?

~~~
chii
I have a bit of hobby experience. One of the reasons i picked haxe as a
platform/language is that it's cross-platform, but easy to delve down into
native, since it's a source to source compiler. This means you write most of
your code in cross-platform ways, but when shit hits the fan, you can always
fight your way out by going native (which is quite seamless - such as externs,
or even embedding raw native calls directly into the haxe source, useful as a
last resort).

Haxe as a language, is very similar to java/c# in style (or actionscript - if
you know that language). It is superficially similar to javascript too, but
has a bit of semantic differences (it's not a prototypical language). The best
language feature is its macro system. It is only 1 step below the LISP macro
system, since macros are actual code, and you get to modify AST at compile
time.

as for the library ecosystem, there's plenty of existing libraries in both
pure haxe, as well as haxe externs into target native platforms. Quality vary,
but you can say the same about any language's library ecosystem. Haxe's
library ecosystem is mainly targeted at games - lime, openfl, haxeflixel,
haxepunk, kha, babylonhx, and many many other engine/frameworks for games
exist. Most of them are relatively easy to use, but as with all open source
projects not backed by a large corp, there are warts, and you often have to
either workaround them, or fix it (and in the process contribute!).

I haven't written any web-server/web-app using haxe, but i think it's also a
popular type of app to write in haxe.

IDE integration is great with visual studio code (and intellij too).

Over all, i can't find any faults that i can't live with or fix, and am happy
to continue playing with haxe. It can only improve in time.

