title |
---|
Metaprogramming |
Metaprogramming is the writing of computer programs with the ability to treat programs as their data. It means that a program could be designed to read, generate, analyse and/or transform other programs, and even modify itself while running. -- Wikipedia
Nim's two constructs -- templates, and macros offer powerful metaprogramming capabilities.
- Introduction to Metaprogramming in Nim by Dennis Felsing offers good explanation of metaprogramming capabilities of Nim with examples and when to reach for metaprogramming.