Re:Software reuse is more like an organ transplant than snap...
by heavyset_go on Thursday June 25, 2020 @02:47PM
(#23644085)
One can say similar things about interfaces in object-oriented programming.
[ Parent
| on HN ]
Re:Software reuse is more like an organ transplant than snap...
by AnimalMuppet on Thursday June 25, 2020 @03:28PM
(#23644529)
Not really. OOP interfaces are usually much more intricate than FP interfaces. You might say that they are less like a lego interface and more like electronic connectors. There are several different electronic connectors types, and they are designed so that you physically can't plug the wrong things together. OOP is like that - a more complicated interface that makes it impossible to connect anything-to-anything the way legos can.
On the other hand, if you're trying to build something large (a house, say - a real house, not a toy one), you don't want the lego interface. Sure, you can plug anything to anything, but not all of those connections make sense. Also, for building something that large, legos are too small a building block to be convenient. You want some larger things - beams and sheets of wood and particleboard, pipes, air ducts. You don't want to have to build all of those out of tiny blocks.
In the same way, I wonder if building larger applications out of FP is going to be similarly tedious. I have never done it, so I will admit that I don't know.