• Enhancement proposal: Metaprogramming support
  • Description
  • Basics
  • Examples
  • 1. Symbolic Differentiation
  • 2. Symbolic Differentiation with Templates
  • 3. Newton's Method
  • 4. Indexing an arbitrary-dimension array
  • Use Cases
  • 1. Parsing expressions
  • 2. Alternate representations of classes
  • 3. Moving computation from runtime to compile time
  • 4. Simplifying syntax
  • 5. Other optimization
  • Design Issues
  • 1. Template format
  • 2. How to make this as natural as possible by avoiding explicit trees as much as possible
  • 3. How to implement
  • 4. How will this work with method?
  • 5. Whether/how to unify compiler macros and SBCL's transforms with this enhancement
  • 6. When you want to insert statements inside an expression
  • 7. Defining new statements, function definitions, class definitions, etc.
  • 8. Variable capture and hygienic macros
  • 9. Evaluating arguments more than once
  • Related Systems