3 ms·
Yes, exactly. OO is about encapsulation and associating behavior with state. FP is about working with immutable state. I have never understood why they are view
by geophile 9y ago
Yes, exactly. OO is about encapsulation and associating behavior with state. FP is about working with immutable state. I have never understood why they are viewed as opposing. This discussion I participated in goes into that a little:
See my (geophile's) comment here: https://news.ycombinator.com/item?id=13850210 https://news.ycombinator.com/item?id=13850210