3 ms·
To be fair, as much as Rust macros are nice, it is a losing battle to go up against the Lisp macro system. Lisp might have its flaws, but macros in Lisp are sec
by rootnod3 1y ago
To be fair, as much as Rust macros are nice, it is a losing battle to go up against the Lisp macro system. Lisp might have its flaws, but macros in Lisp are second to none.
When to use them is a whole different story. But examples of macros I like are `when` and `unless`. Yes, simple, but they show a nice example of their power.
For more complicated once, love it or hate it, but the `loop` macro is probably THE prime example of a powerful macro.