3 ms·
The flip side is maintainability, which gets much simpler long term with FP.
by brightball 5y ago
The flip side is maintainability, which gets much simpler long term with FP.
- taeric 5y agoDo you have evidence showing this? The few long term maintained programs I am aware of are decidedly not what one would call modern functional. (Granted, the most ported and maintained software I know of is either Linux or SCUMM.)
- hvs 5y agoThis is a statement that requires some sort of citation. Extraordinary claims and all that.
- brightball 5y ago20 years experience with OO code. Over time, OO always leads to entanglement due to inheritance based solutions that seemed like a good idea at the time. Eventually, these become the basis for many other parts of the system. You combine the potential for side effects in the code with a tree that can't easily be changed because of how many other things it will negatively affect and you end up with a code base that is harder and harder to change the larger it gets. In a FP approach, this is a class of problems that you can't easily replicate. Yes there's a learning curve to operating in a FP style, but once you're able to move quickly with it the long term rewards are a byproduct. The OO solution to avoiding this problem is to build with microservices instead, which forces different parts of the system to be isolated and minimizes the negative effects from entanglement...but microservices come with their own maintenance and speed of development headaches as well.
- mbrodersen 5y ago35 years of OO experience here. Maintaining very large C++ code bases. I never have OO entanglement problems due to inheritance based solutions. Why? Because I only use inheritance for interfaces. Nothing else.