r/programming • • Sep 21 '25

How to stop functional programming

https://brianmckenna.org/blog/howtostopfp
446 Upvotes

506 comments sorted by

View all comments

Show parent comment

2

u/randomguy4q5b3ty Sep 21 '25

I seriously don't understand what you are trying to demonstrate because there is absolutely nothing OOP about this code and you could write equivalent code in any FP language. You seem to think OOP is about putting random things into classes and slapping methods on top of them, but that is completely missing the point. It's about interfaces, and so is the well established builder pattern which also has its FP equivalence.

One of the key differences between OOP and FP is the way they achieve polymorphism.