4 ms·
Here is my take on it. At one point "Object Oriented" became "Blockchain" (or now Gen AI) of those times. You had to be "object oriented" in order to be taken
by KorematsuFredt 2y ago
Here is my take on it.
At one point "Object Oriented" became "Blockchain" (or now Gen AI) of those times. You had to be "object oriented" in order to be taken seriously. This applied to everything. Even finished software products were called "built using object oriented".
The esoteric concept of inheritance became popular after that. At some point it became so popular that people figured out that it is not really a good thing.
- blowski 2y agoPragmatists 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.
- blarg1 2y agoAlso a semi religion, I'm always seeing people say before OOP everything was terrible, and everything good thing is due to OOP (eg structs, methods, polymorphism)
- bluetomcat 2y agoIn the 1990s, it coincided with the proliferation of GUIs and their respective programming interfaces. Most frameworks use hierarchies like Object->View->Control->Button->ImageButton. Then people decided that this is the way for modeling abstract problems that don't have to deal with visual or real-world entities whatsoever.
- dsego 2y agoAnd you would get nice automatic completion when doing object name, dot, and waiting for the IDE to list all possible methods. This was exploratory programming, the copilot of its time.