3 ms·
Pragmatists used inheritance because it gave a quick benefit now, and the longer-term costs were ignored. Some pragmatists became successful because they moved
by blowski 2y ago
Pragmatists used inheritance because it gave a quick benefit now, and the longer-term costs were ignored. Some pragmatists became successful because they moved quickly, so the "Programmers from the Church of Purity" used inheritance because successful companies used inheritance. When inheritance was no longer the quickest way to move quickly, the pragmatists moved on. The Church of Purity now bangs on about Functional Programming in the same way for the same reasons.
- mewpmewp2 2y agoFP rather slows things down though.
- pyrale 2y agoWhat specifically slows it down in your context?
- mewpmewp2 2y agoDoing every simple thing that used to be done in "normal procedural" way in functional paradigm instead when using something like Scala or fp-ts in TypeScript. Causing engineers to completely change their mental model of how the code runs, which I still have intuitive trouble imagining correctly and I see it with other developers as well. A lot of energy goes into trying to understand how to do a simple action. It is much harder to read the code and have a correct mental model as well.
- pyrale 2y agoWould you say it's a retraining cost, or would you imagine still having this issue many years from now, assuming you keep working on it?
- mewpmewp2 2y agoIt likely also depends on the person so I couldn't speak on behalf of everyone. I have been exposed to it to some extent, not the majority of work for over 5 years and it still intuitively is challenging for me. So similar task would take longer to code and existing code would take longer to understand. Significantly more effort would go to that. I feel like I spend more time and energy on how to get something done functionally rather than focusing on what the correct business logic should be.
- bedobi 2y agolol it's the opposite? map, flatmap, fold etc are very clearly defined operations with very clear use cases and rules. loops are not, you can do whatever you want (often mutating the underlying, rug pulling you every iteration) not being familiar with fp doesn't mean it's objectively worse
- deleted 2y ago[deleted]
- throw_m239339 2y ago> Pragmatists used inheritance Because at some point mainstream OO languages made inheritance easy and composition harder, nothing more. Composition with Java used to be verbose. Inheritance declaration was simply a single keyword. If Java had "mixins" from the start, people would have used composition way more.
- StressedDev 2y agoI saw a lot more composition than inheritance in C++ and C#. I think inheritance and polymorphism have their place. Like anything, they can be misused.
- pyrale 2y ago> The Church of Purity now bangs on about Functional Programming in the same way for the same reasons. FP in the industry is a niche thing, so the two phenomena are not really comparable.
- KorematsuFredt 2y agoPendulum swings once it is this way then another way.