Guidelines for metaprogramming