I considered putting in a footnote acknowledging the existence of this kind of textual macro in languages like C and Bash. Demonstrating the uniqueness of defmacro requires a more sophisticated example, like embedding Haskell.
Edit: I replied to the wrong comment. This was supposed to be a reply to TAG’s parent comment.
Pedantic note: you should do
#define ifnot(x) if (!(x))
(with extra parens around the second instance of “x”) because otherwise you will get probably-unexpected results if x is something like a==b.
You’re right, I’m rusty.
I considered putting in a footnote acknowledging the existence of this kind of textual macro in languages like C and Bash. Demonstrating the uniqueness of
defmacro
requires a more sophisticated example, like embedding Haskell.Edit: I replied to the wrong comment. This was supposed to be a reply to TAG’s parent comment.