Hello, fellow haxers.
I was working with node.js for some time, and that forced me to dive into asynchronous programming. Not just calling async function time to time, but doing that all around. As many others, I found the resulting code not that understandable and not that beautiful. I tried various abstractions, but none of them fully satisfied me. So I figured I can use haxe macros to make my asynchronous code nice-looking(and even strip some overhead you get by using any of async abstractions).
The resulting precompiler proved to be quite useful for me. More than that, it gave me ability to use some very complex logic I was totally unable to write in pure asynchronous code. (Well, I actually was able, but the resulting code looked like spaghetti plate in 2 minutes.)
So I put all that together and now am releasing it as library. It isn't really all that finished and polished, but satisfies my current needs. It needs some more testing though.
It is relatively hard to say what it does in a couple of words, but the point is to just mark asynchronous calls as async and think of it as synchronous calls. Just look at code:
https://github.com/stroncium/hx-async/blob/master/test/Test.hx . Note that this example don't do anything special, but actual code may have all the construction nested, resulting in quite a complex things, to the point it takes hours to understand generated code(true story, I spent many hours on that while fixing some bugs). That is the cause of library being not so well-tested. As far as I can see it should work good, but errors may arrive from some complex patterns.
Oh, and happy New Year!
=== Best regards, Yanis.