Hacker News new | past | comments | ask | show | jobs | submit login

> It's just code that runs when the code is compiled, rather than when the resulting binary is run.

That’s exactly what Haxe macros are. It’s regular Haxe code that runs during compile, and it has access to all Haxe language features and the standard library.

The only special thing about them is that they can directly manipulate the AST before it gets passed on to the compiler for final code generation.

In a sense, they’re like “shaders” for the compiler.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: