3 ms·
I might also point out that OO and FP are not strictly at odds. You can use object libraries in FP languages to encapsulate the state and logic but avoid the mu
by webjprgm 12y ago
I might also point out that OO and FP are not strictly at odds. You can use object libraries in FP languages to encapsulate the state and logic but avoid the mutation of the state.
So if the two issues are orthogonal then you're both right. :-)
- crimsonalucard 12y agoGood point. So if I use OO while maintaining immutability then am I doing functional programming, OO or both?
- jerf 12y agoAt the risk of going really philosophical, in the end words are just words, and your program is what it is. Given the vast, vast, vast space of possible programs it should come as no surprise that little tiny English words are hardly up to the task of completely rigidly classifying them. Especially programs, which are quite literally the most perverse mathematical constructs known to man, courtesy of the Church-Turing thesis.
- Dewie 12y ago> You can use object libraries in FP languages to encapsulate the state and logic but avoid the mutation of the state. Where is the OO in that approach? The encapsulation?