5 ms·
After years of OOP I came to the conclusion that OO is no good. It has too many problems with parallelism - you have to use way too many kludges to make your sh
by leon_ 15y ago
After years of OOP I came to the conclusion that OO is no good. It has too many problems with parallelism - you have to use way too many kludges to make your shiny objects work in parallel.
For _me_ Data Oriented Programming is the future. My data does not need to be intelligent. For that I have my central data processors. As soon as there are no "objects" that need to talk to each other parallelism becomes so hassle free.
The only case I still like OO for is UI programming.
- dkersten 15y agoI agree. Nowadays, I often provide an OO-based interface, but these objects are really just proxies to the non-OO data oriented internal system. I'm very much interested in multithreaded programming, so it often makes sense for me to dump OO in favour of more parallelism-friendly code. I also find that functional programming is often a much more natural fit for solving a lot of problems than OO is. I find thinking in terms of streams, lists, trees, tables and higher order functions often maps much better to the data being modeled than an object hierarchy does and is often more parallelism, cache and out-of-order processing friendly than OO is. I don't really feel that OO is very suited to modern processors and certainly not to every problem we are trying to solve.
- andrew1 15y agoDo you have a link to what you consider to be a good description/definition/tutorial of "Data Oriented Programming"?
- iaskwhy 15y agoAlmost off-topic: I voted you up because I am also interested in knowing a little more about this and thought by voting you up other people would see there's more people interested in it. Then I realised points are hidden...
- JoachimSchipper 15y agoIt will still be seen by more people, and let the author know that this was appreciated/to write more stuff like this.
- stonemetal 15y agoWhenever I run across Data Oriented Programming it is almost always called Data Oriented Design. You focus on your data and what transformation it needs to undergo to become output. Noel's blog is probably the best source of information for that style of programming I have seen. http://gamesfromwithin.com/data-oriented-design http://gamesfromwithin.com/data-oriented-design
- andrew1 15y agoThanks, that's an interesting article.
- deleted 15y ago[deleted]
- _0ffh 15y agoOO is a conceptual tool, and therefore it falls under the rule: "Use the right tool for the problem at hand." Same goes for DO. The problem are guys (and gals) who have learned how to hold a hammer (but little else), and therefore treat everything as a nail. OO has undoubtedly been extremely overhyped. Unfortunately the backlash is not as hard as it should be, because by now OO is so firmly entrenched in the corporate sector that it will take (at least) one generation to merely flush it out of the fields where it doesn't belong at all. That said, sometimes OO might be just what you want to finish the job cleanly and on time. [Edit: typos]