Metaprogramming — Junior¶
Decorators, annotations, reflection, macros, and generators make code act on code. First prefer ordinary functions and data. Use metaprogramming when a stable repeated pattern exists and generated behavior remains testable and discoverable.
Test yourself¶
- Can a normal function solve it?
- When does generation happen?
- Can a debugger show the behavior?
Continue to middle.md.