[In this reprinted #altdevblogaday-opinion piece, Nokia software engineer Martin Zielinski argues that you don't give up much with data-oriented design, and scrutinizes the advantages people often cite with object-oriented programming.]
This post is not about the performance advantages of data-oriented design (DOD), as this has been covered already pretty extensively by much smarter guys. (see links below)
What I want to talk about, are the prejudices that I always hear when people start to defend their holy objects. Everyone and their mother is constantly reiterating the advantages of object-oriented programming (OPP) – productivity increase, maintainability and code-reuseability. Should we really sacrifice all these good things just in favor of faster execution times?
What are the advantages of OOP everyone is so keen to protect? I think this list should cover most of the claimed benefits:
- Encapsulation
- Inheritance
- Polymorphism
- Modularity
- Code-Reusability
- Elegance
- Extensibility