Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How come nobody comments about this feature of Nimrod:

> a powerful (AST based, hygienic) macro system

...and I can't find any easy to digest example of it? I know, macros are "evil" and shouldn't be overused and this is not Lisp and all, but it actually seems like a potential killer feature for a language targeting the C/Rust/Go niche.



Easy enough if you go to the Nimrod site and look at the documentation:

http://nimrod-code.org/tut2.html#macros

http://nimrod-code.org/manual.html#macros

Note that Nimrod also has templates, which also uses AST-based macro expansion.


Hygienic AST-based macros are starting to surface in quite a few non-sexpr languages. Rust has them, and IIRC Elixir does too. It's an exciting trend.




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

Search: