I understand the theory behind metaprogramming, but what eludes me are examples. What kinds of problems have been solved by metaprogramming? Could other solutions have been used? How does one learn how to spot problems which would best be solved by metaprogramming? How does one get comfortable reading code that involves macros which modify syntax in possibly unexpected ways?
(Apologies for the load of questions, your response kicked my brain into high gear there)