Extending Object Behavior with the Decorator Pattern
Runtime Dynamism without Mutation
6 min readOct 13, 2018
In a previous article, we discussed how to use the strategy pattern to dynamically change an object’s behavior at runtime. Classically, polymorphism in object-oriented design is static and achieved through inheritance; however, with the strategy pattern you can accomplish the same goal dynamically. Indeed, this is an…