7 ms·
The content of what you discuss is true there are juniors that argue for it based off of ideology. But the origins of the hate against OOP is not a cultural mis
by leafboi 6y ago
The content of what you discuss is true there are juniors that argue for it based off of ideology. But the origins of the hate against OOP is not a cultural misunderstanding. I hate OOP and I'm pretty good at both FP and OOP.
Well hate is too strong of a word. I don't hate OOP, but i definitely think it's a mistaken paradigm.
I think there's actually an opposite phenomenon going on side by side with the one you discussed.
Too many senior programmers are really great experts at OOP while never really examining the faults or mastering alternative paradigms. The time invested into OOP leads to a huge bias in favor of it. When OOP is evidently (to me) too be worse than procedural programming and FP people are unwilling to give up years of time invested into OOP. When experts decry OOP of course someone with 10 years of experience in JAVA is going to object. That's the way people work.
The bias comes from both directions. If you think OOP is pretty good and everyone else is biased... ask yourself are you a master at OOP and FP or just OOP? If you're great at both paradigms and the time invested into both paradigms are equal... than you have the ability to make an unbiased choice. Until then most people on this thread are java guys promoting the skill they've been honing for years.
A master carver isn't going to decry his years of training just because a 3D printer can beat him at his game. Humans don't work that way. This is mostly what's going on.
- didibus 6y ago> I hate OOP and I'm pretty good at both FP and OOP. Well hate is too strong of a word. I don't hate OOP, but i definitely think it's a mistaken paradigm. Thank you for demonstrating my point :p This is exactly what I'm referring too. The use of hyperboles or blanket statement by experts, which are taken at face value by those learning from them. Whereas your real sensibilities are well reasoned, nuanced, and your disliking of OO is in the details. Not everyone can get that from your reaction. So it creates this fashion trend, it's trendy to hate on OO. That's not constructive, because experts also know there's a lot to learn from OO, and not everything about it is bad.
- leafboi 6y ago>That's not constructive, because experts also know there's a lot to learn from OO, and not everything about it is bad. Isn't this statement the same? You don't get into the details of who these experts are, what they like about OOP. You summarize the issue because that's what humans end up doing rather than writing a whole essay about what's so great about OOP. Also you're communicating with someone who you presume already knows the details. You're a parody of your own statements. You create the opposite fashion trend to hate on people who hate OOP which I see plenty of nowadays. Literally half the posts on this thread follow your ideology: "I don't fully understand either paradigm so rather then picking the fashion trend I decide to make up a new one and be one of those people waving white flags and calling everything apples and oranges because I can't figure out which is worse or which is better." Since you're unable to find one paradigm better than the other you think others are just being opinionated on the details, so you declare: It's All the Same! Everything is equal! This is pure fantasy. OOP does not stand on equal ground to FP or even Procedural programming. It's like comparing Hitler to Mother Teresa, not all things in this universe are equal. When you look deeply you will find that there IS absolutely something wrong with OOP. It's not a little detail thing. There is something fundamentally wrong with OOP. Not only that, but you will find that the "experts" in CS have largely discounted OOP. I can assure you the "experts" largely discount OOP by a huge margin. OOP doesn't even have a formal definition. By experts I mean academics who are experts in programming language creation using formal and mathematical theory. Someone like Martin Fowler is not an expert because all Martin Fowler does is classify concepts with qualitative descriptions and big words. Let me clarify. An example of an expert in PL theory is someone who can create a programming language that can prove itself correct. Essentially programming languages that are not only type safe, but logically safe to the maximum degree. Idris is an example of one of these programming languages. Imagine writing in one shot, no incremental testing a 9000 line program with zero bugs. Studies in formal verification enable this with cost... and people who know this stuff are an example of experts in the field. An example of someone posing to be an expert is someone drawing 3 boxes and using lines to connect it to a single parent and calling that the "Trinarium Pattern" in order to sound like an expert. This is largely what "OOP experts" are including Martin Fowler. You don't believe me? Why don't you try to find a book on the formal theory of OOP. One that starts off with the axiomatic foundations of OOP. You want to know why "lambda calculus" books exist but there are no "Object Oriented Calculus" books? Because there is no formal theory of OOP period. It literally doesn't exist among "experts." If anything this post should at least point you or someone in the direction of why OOP is just bad. OOP doesn't have formal foundations... no one has bothered to turn it into a theory or science because it's just that bad.
- YeGoblynQueenne 6y agoWhy are OOP and FP (Functional Programming) discussed as the only two alternatives, in this thread? Another comment a bit earlier than this one also seemingly made this assumption. There are other programming paradigms and there are of course multi-paradigm languages. As a for instance I do most of my work in Prolog these days (because PhD) which is a logic programing language, so neither OOP nor FP but, er, well, LP. There's many logic programming languages that mix multiple paradigms like Logtalk (LP and OOP), Visual Prolog (LP and OOP) Mercury (LP, OOP and FP), OZ (LP, OOP, FP, constraint, concurrent) etc etc. I mean, I understand that OOP and FP may be the only relevant paradigms in a particular context- but, in that case, what is the context that is assumed in this thread? Web development? App development? Games development? AI? Data science? Embedded systems? Compiler writing? EDIT: I guess this "OOP or FP" thing reminds me of myself at my first undergrad CS year. I knew a bit of JS/HTML/CSS, a bit of Java and C#, a bit of SQL and had heard of C and C++ so I was trying to place them into categories, like "C#, Java and C++ are OOP, C is procedural, that's it, there's no other paradigms". Then, in the second year I met Prolog and it kind of blew my mind. It's good to have one's mind blown like that, though it stings at first when one realises how little one knows and how many assumptions one built on such little knowledge. One feels a little dumb. But one quickly gets over it because there is suddendly a world of interesting new things to learn.
- leafboi 6y agoIt's weird because OOP and Procedural kind of go hand in hand. If you program in Java likely you're doing both procedural and OOP. And the technical definition of OOP isn't formalized either so in some cases you can do FP and OOP at the same time as well. However, mutation is very very often used with OOP so if mutation encompasses the definition of OOP then it remains separate from FP. Either way as you go up the ladders of abstraction things become much hard to control. I think LP is the theoretical next step.. the next level of abstraction. It's like 3D printers. We want to build a 3D printer that can print out a working motorcycle but without fine grained control over the process it's hard and still WIP. Above LP would be like alexa or google home. Imagine trying to build something by describing it in the english language. Either way the reason why LP is not pervasive is because programs are generally fine tuned precision parts. It's the same reason why we still build houses with construction workers not 3D printers. The closest you get to LP in the real world is SQL. The problems I describe are evident for experts in SQL. SQL experts are largely people who "hack" at the syntax trying to bend it in arbitrary and unexpected ways to get a performance boost. stuff like SELECT * FROM TABLE_WITH_TWO_ITEMS; vs. SELECT item1, time2 FROM TABLE_WITH_TWO_ITEMS; are just arbitrary hacks that have no surface level meaning. (Supposedly the second expression is not as performant in case you're not that familiar with SQL hacks). I guess a good way to describe this are the words "leaky abstraction." If we move too far in the declarative direction we tend to hit more and more leaky abstraction problems. Essentially the programmer needs to understand the surface API as well as the internals. Additionally Lower level optimizations begin to be expressed as high level isomorphic expressions with no explicit reasoning (IE sql syntax does not explicitly tell you why item1 and item2 are faster then *).