Why can't functional and OO programming get along, /g/?
Both are meme tier
>>57906797
They already do, it's just that the zealots of both sides refuse to recognize it. You just use objects to encapsulate and control state safely, and then use immutable constants and purely functional methods to manipulate that data from received state, only transforming state via message-passing to objects.
>>57906950
Interesting, do you think Scala does this job well? Or is there any other language worth mentioning
>>57906797
FP is made by academics who have never heard of encapsulation, polymorphism, compilers, loops, or real life. OOP is made by professionals who know what it's like in the trenches. If you think FP is worth wasting time on, obviously you've never killed a man.
Because OO is garbage.
Functional is good for some tasks, mostly is just fun to do. OO is neither of these things. It's just awful outside of a theoretical nice idea point of view.
>>57906972
I haven't ever used Scala. I use Lisp. You can do that kind of programming in any kind of multi-paradigm language, which is most of them these days.
>>57907045
When you use composition and mixins instead of overusing inheritance it becomes much nicer.
>>57907214
You can't overuse inheritance. You're thinking of subtyping. They're completely different.
>>57906797
>What is Python
>>57906950
It sounds like you're basically describing monads with extra steps