Kotlin Design Patterns: Simplifying the Decorator Pattern
The Decorator Pattern is a flexible alternative to subclassing for extending functionality. It allows behavior to be added to individual objects without affecting the other objects from the same class. It is particularly helpful when changes are needed during runtime. Also, it’s helpful when subclassing would result in an exponential Read more…