Macros are used for metaprogramming in C. As an example, a generic List is
typically implemented with macros, such as LIST_HEAD_INIT
in the Linux kernal
or LL_*
in (https://troydhanson.github.io/uthash/utlist.html).
I tend to dislike macros, especially ones that emulate control structures and function-macros liberally shrewn about the code. I do like the idea of C++ metaprogramming, but it can get a bit obscure.