Advanced Programming Language Features for Executable Design Patterns "Better Patterns Through Reflection"

The Design Patterns book [GHJV94] presents 24 time-tested patterns that consistently appear in well-designed software systems. Each pattern is presented with a description of the design problem the pattern addresses, as well as sample implementation code and design considerations. This paper explores how the patterns from the “Gang of Four”, or “GOF” book, as it is often called, appear when similar problems are addressed using a dynamic, higher-order, object-oriented programming language. Some of the patterns disappear – that is, they are supported directly by language features, some patterns are simpler or have a different focus, and some are essentially unchanged.