ArjanCodes
23 minutes
Classic object-oriented design patterns (Strategy, Observer, Template Method) are not obsolete because they describe recurring classes of design problems, not specific class-and-inheritance implementations. The same decoupling can be achieved with first-class functions, by passing functions (or collections of functions) as arguments, returning functions (closures), or partially applying arguments, often with less code. This belongs to software design, bridging object-oriented design patterns and functional programming: what matters is recognizing the problem category and choosing an implementation approach suited to the language.