Design Patterns and Best Practices

Contact

Prof. Dr. Claus Möbus

Room: A02 2-226


Secretary

Manuela Wüstefeld

Room: A02 2-228

Tel: +49 441 / 798-4520

Design Patterns and Best Practices

Creating Modules and Private Packages

Macros and Metaprogramming Techniques

- Macros and Metaprogramming I

  • Experimenting with the Parser
  • Single-variable Expressions
  • Alternative Construction Methods for Expr-Objects
  • Construction of sexpr-Objects
  • Function Calls
  • Function Calls with Keyword Arguments
  • Nested Functions

- Macros and Metaprogramming II

  • Constructing Expressions Manually
  • Constructing ASTs
  • Assignment
  • Code Blocks
  • Conditionals
  • Loops
  • Function Definitions
  • Evaluating Expressions
  • Interpolating Variables in Expressions
  • Using QuoteNode for Symbols
  • Interpolating in Nested Expressions

- Macros and Metaprogramming III

  • Writing Our First Macro
  • Passing Literal Arguments
  • Passing Expression Argument
  • Function showme: passing values (= evaluated expressions)
  • Macro showme: passing unevaluated expressions
  • Understanding the Macro Expansion Process
    • Timing of Macro Expansion
  • Manipulating Expressions
    • Example 1: Making a New Expression
    • Example 2: Tweaking the Abstract Syntax Tree

 

 

 

 

Webmaster (Changed: 12 Jul 2025)  Kurz-URL:Shortlink: https://uole.de/p113478en
Zum Seitananfang scrollen Scroll to the top of the page