What Is the Decorator Pattern?
A complete guide to the Decorator pattern: what it is, the class-explosion problem it solves, its four building blocks (Component, Concrete Component, Decorator, Concrete Decorator), a step-by-step build in pseudocode, comparisons with Subclassing / Strategy / Proxy / Adapter, real-world examples (Java streams, photo filters, middleware), trade-offs, and how it looks across Java, C#, TypeScript, and Python.