Metaprogramming

Why is Metaprogramming done ?
- To get around limitations in the primary development languages. Usually, this sort of thing is done when there is a management edict to use a particular language. The use of a different language is not allowed but doing MetaProgramming with the development language as the target is politically acceptable.

- To encapsulate domain-specific knowledge. These languages are generally more domain-dependent.
- To allow users to configure and program a system even though it is assumed that the user will not be capable of modifying the program source directly, or might not even have access to that source.
Is metaprogramming a good idea ?
The answer to the problem of whether Metaprogramming is a good idea or not depends on how domain-specific the meta-language is and on how complicated it is. The domain-specific meta-languages are more justifiable and simpler, and simpler is better.
_______________________________________________________________________________
References
- http://c2.com/cgi/wiki?MetaProgramming
- https://en.wikipedia.org/wiki/Metaprogramming
- https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0ahUKEwj43tuJ7LfPAhWJZiYKHYOLCAMQjRwIBw&url=https%3A%2F%2Fmetaprogram.bandcamp.com%2Falbum%2Fmeta-programming&psig=AFQjCNG3G2iwikLjcD1BMy_NBybNsxrUoA&ust=1475350229034271(Image)
- https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&ved=0ahUKEwjEztra7bfPAhUF4SYKHQdxCxgQjRwIBw&url=https%3A%2F%2Fwww.crondose.com%2F2016%2F08%2Fexamples-metaprogramming-guide-beginners%2F&psig=AFQjCNG3G2iwikLjcD1BMy_NBybNsxrUoA&ust=1475350229034271(Image)
_______________________________________________________________________________