Metaprogramming provides a highly flexible approach to solving complex programming problems. Although metaprogramming can be challenging to implement in some programming languages, metaprogramming is easy to implement in Stata largely because of the evaluation of local macros. However, metaprogramming is rarely discussed in the Stata community despite the benefits that metaprogramming can and does provide for many Stata users already. This talk will include a discussion of what metaprogramming is and how metaprogramming can be used effectively to increase efficiency and will illustrate the use of metaprogramming in Stata.
Code examples are embedded in the slides and some examples, and output, are included here. Following the presentation, I will add some additional slides that I am excluding from the talk to stay within the time allotted.
I had removed a couple of slides prior to the talk for timing purposes. These slides are now available which show another couple of examples of using metaprogramming in different ways.
Because I fork the reveal.js source to generate my slides, I am including the
license for reveal.js. However, it should be noted that the license applies solely to the source code for reveal.js
and not the content of the slide deck.