4 ms·
Complaining about OOP is like complaining about vaccines. The positive results of OOP are so ubiquitous that it's invisible to people. Instead the few negativ
by wvenable 6y ago
Complaining about OOP is like complaining about vaccines. The positive results of OOP are so ubiquitous that it's invisible to people. Instead the few negative reactions get all the focus.
- jstimpfle 6y agoDepends on what you mean by OOP. If you mean the concept of handles, messages, and fault isolation, then OOP is the right way to structure many solutions. If you're talking about classes, methods, inheritance, and so on, then it's just a syntax equivalent of training wheels. If you want to progress to biking downhill at full speed, most of this needs to come off at some point since the structure is not suitable for more complex situations. This kind of OOP strongly encourages componentization at the smallest level, much much more than is beneficial from an organization standpoint (subsystems).
- FpUser 6y ago>"If you're talking about classes, methods, inheritance, and so on, then it's just a syntax equivalent of training wheels." Everything above microcode is. Abstractions / paradigms when applied adequately help to see the forest beyond the trees.
- jstimpfle 6y agoI've never thought about it this way. To me it's more like, many different paradigms and cleverness are the forest and as well the trees. When I see an object-oriented codebase that makes me jump between 5 or more files to understand the simplest codepaths (because inheritance), and that is not browseable without a properly setup IDE and jump-to support (because of heavy namespacing and non-telling method names), it makes my shy away. On the other hand for example, larger open source projects written in C are often really easy to read. Local ("coherent") code paths, fully qualified function names in calls, no extra foo that gets executed implicitly on data data declaration or cleanup. Nothing hidden, every line just works to solve the actual problem.
- astrange 6y ago> This kind of OOP strongly encourages componentization at the smallest level, much much more than is beneficial from an organization standpoint (subsystems). Yep, and also even though OOP was designed as a way to model simulation systems, it isn't the best thing for actual popular simulation systems (video games). They use more flexible patterns like entity-component systems. OOP also wants to always layout data as array-of-structures, which can be less efficient than structure-of-arrays. Data layout is the most important thing for efficient programs, since memory access is so slow.
- wvenable 6y ago> then it's just a syntax equivalent of training wheels. I wonder if there is a divide between people who programmed before OOP was commonplace and those first experience is learning it in school. For me the idea that OOP is not suitable for more complex situations betrays it's very conception.
- astrange 6y agoExamples of alternative models to imperative OOP that have languages: https://en.wikipedia.org/wiki/Entity_component_system https://en.wikipedia.org/wiki/Entity_component_system (game-style C++) https://en.wikipedia.org/wiki/AoS_and_SoA https://en.wikipedia.org/wiki/AoS_and_SoA (Jai) https://en.wikipedia.org/wiki/Relational_model https://en.wikipedia.org/wiki/Relational_model (SQL) https://en.wikipedia.org/wiki/Logic_programming https://en.wikipedia.org/wiki/Logic_programming (Prolog and Mercury) The goto critique of OOP used to be http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom... (as seen in the article) but I think OO languages have managed to steal enough good ideas from functional ones by now that it doesn't apply so much.
- wvenable 6y agoOOP is several orders of magnitude more successful than all these alternatives combined. As I said, it's so successful that its success is invisible. All that is ever talked about are the tiny percentage of exceptions where OOP doesn't work well like, for example, where entity-component might be more appropriate. Those tiny exceptions get way more attention. Being contrarian to the massive success of OOP is great way to get upvotes but it doesn't reflect reality. The success of OOP is so huge that it's boring.
- astrange 6y agoVideo games are the only kind of software people like enough to regularly pay $60 for and write emulators to run, so I think we should learn to respect how they're made, which is using OO languages but not using all the ideas. Also I think SQL is pretty popular!
- FpUser 6y agoMany programmers are in general very opinionated about their tools. I have no idea why. I do not get all that excited about ways of doing things. To me they are just tools.
- wvenable 6y agoSome like to feel very superior about their tools. But there's a huge variety of programmer personalities; different programmers like different things about programming. We tend to gravitate towards tools that fit our own personality. The problem is thinking because you found the tool that's the perfect fit for you, and what you're trying to accomplish, that it's a superior tool in general. I understand why some developers love LISP and think it's the greatest programming language ever. They wonder why nobody else would use a tool so powerful. But it's really not for me -- it's just not what I like about programming. I feel the same about pure functional languages. I've used them enough to understand the appeal. But for me, I find it constrains my creativity. I found the same with Test-driven-development. I can't just can't work by building the tests first -- and I tried. But I can imagine other programmer personality types find that TDD helps their creativity.
- FpUser 6y agoI get my kick out of what I do. Not how I do it. My specialty is to design and implement products and kick it out the door for people to use. The last thing I care about is the language / paradigm / whatever as long as it does not impede development. Never give a flying fuck about what's in vogue at the moment. >"Test-driven-development" I would normally offer them to write tests to test their tests.