3 ms·
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
by nnq 13y ago
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.
- lobster_johnson 13y agoEasy enough if you go to the Nimrod site and look at the documentation: http://nimrod-code.org/tut2.html#macros http://nimrod-code.org/tut2.html#macros http://nimrod-code.org/manual.html#macros http://nimrod-code.org/manual.html#macros Note that Nimrod also has templates, which also uses AST-based macro expansion.
- kibwen 13y agoHygienic 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.