DEV Community


Discussion on: Do the SOLID principles apply to Functional Programming?

hugecoderguy profile image
Christian Kreiling

Doing great, you've had me thinking about OOP design patterns over the last few days. I think we're saying the same thing wrt the strategy pattern; it's a means of taking some functions and composing their inputs & outputs through a centralized code module, which is what all programs written in an FP language look like. What similarities do you see between Function Composition and Composite Pattern? I see the Composite Pattern more as a means of representing a tree structure in a strongly-typed OOP language, is this what you mean when you say Composite Pattern?
Ooh, I really appreciate your observation "a lot of the design patterns were created to give oop languages the flexibility that functional languages get for free without losing the control over data and state." I've been trying to put that into words for awhile now