4 ms·
Depends 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 y
by jstimpfle 6y ago
Depends 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!