# Metaprogramming
[[Programming]]
Metaprogramming is the ability of a user to interact with the compiler to construct arbitrary programs at compile-time. This allows users to add new language features or implement complex optimizations. Often done with [[Macros (Programming)]].
## People
Some people working in the field:
- [[Laurence Tratt]]
- [[Shriram Krishnamurthi]]
- [[Oleg Kiselyov]]
## ZK
- [[ZK - Adding metaprogramming capabilities is planning for growth ]]
- [[ZK - Lisp metaprogramming provides IDE features]]
## Languages
See:
- [[Common Lisp]], [[Common Lisp Macros]]
- [[Scheme]], [[Hygienic Macros]]
- [RPython](https://rpython.readthedocs.io/en/latest/getting-started.html)
- [[Template Haskell]]
- [[Rust]]
- [[C++]], [[C++ Templates]]
- [[C]]: [libpas style](https://github.com/WebKit/WebKit/blob/main/Source/bmalloc/libpas/Documentation.md).
- [[Ocaml]] with [[MetaOcaml]]
Also:
- [[Code Generation]]
## Articles
### To read
- [Laurence Tratt: Compile-time meta-programming in a dynamically typed OO](https://tratt.net/laurie/research/pubs/html/tratt__compile-time_meta-programming_in_a_dynamically_typed_oo_language/)
- [Laurence Tratt: When Are Macros Useful?](https://tratt.net/laurie/essays/entries/when_are_macros_useful.html)