3 ms·
I hate to go on a tangent, but what are some examples of things that OOP does better than FP? I can only think of a couple examples: data structures and some A
by pitaj 10y ago
I hate to go on a tangent, but what are some examples of things that OOP does better than FP?
I can only think of a couple examples: data structures and some APIs.
- sevenless 10y agoAnything that behaves like an object, would be the obvious answer. GUI elements, things in games or simulations. More abstractly, an object's a namespace with persistent properties, so for something that has a persistent, possibly mutable, state, an object is the metaphor you want. Whether data structures should be objects rather than primitives depends very much on the data.
- stickfigure 10y agoErm... pushing data structures between APIs is the essence of countless viable businesses. I love both FP and OOP and especially love using them together. I honestly don't get these arguments.
- sotojuan 10y agoI think what frustrates me is that I see these people as, for lack of a better word, "posers". I'm no functional expert and I'm just in the beginning of my career, but I'm very skeptical of devs who had little problem with imperative/OOP code suddenly writing Medium articles saying OOP is dead and "functional" is the "next" step. Just makes me uncomfortable, but I'm learning to ignore it.
- pitaj 10y agoIt wasn't an argument. I was asking a real question I am curious about.