I believe the document is arguing for a change in how we use OOP languages, not necessarily switching to procedural languages like C.
OOP is still very useful for some larger program structure, they are talking about the cost of bringing the overheads of OOP down into the inner loops of a program. There will always be a tradeoff between abstractions to help improve code reusability/maintainability/clarity/structure, weighed against performance "on the metal".
You wouldn't write photoshop in assembly, but you might write some of the filters in it. To give a metaphor.
Good blog DEADC0DE, I always enjoy reading your posts.
Even if I hate C++, I don't see how C could really help. It's really an array-of-structures versus structure-of-arrays problem, and I'd say any language I've seen so far has types that prefer the former to the latter. Actually you might argue that switching to SOA is easier in C++, because you can do it "transparently" by crafting class allocators or handles or similar devices...
January 18, 2010 at 1:12 PM
http://research.scee.net/files/presentations/gcapaustralia09/Pitfalls_of_Object_Oriented_Programming_GCAP_09.pdf: Explains also some of the choices I made here.
"Links"
3 Comments -
Great doc. But, after have read it, haven't you the idea the best solution, specially with multi-core systems, is... straight C?
Ric
January 17, 2010 at 3:13 AM
I believe the document is arguing for a change in how we use OOP languages, not necessarily switching to procedural languages like C.
OOP is still very useful for some larger program structure, they are talking about the cost of bringing the overheads of OOP down into the inner loops of a program. There will always be a tradeoff between abstractions to help improve code reusability/maintainability/clarity/structure, weighed against performance "on the metal".
You wouldn't write photoshop in assembly, but you might write some of the filters in it. To give a metaphor.
Good blog DEADC0DE, I always enjoy reading your posts.
January 17, 2010 at 3:38 AM
Even if I hate C++, I don't see how C could really help. It's really an array-of-structures versus structure-of-arrays problem, and I'd say any language I've seen so far has types that prefer the former to the latter. Actually you might argue that switching to SOA is easier in C++, because you can do it "transparently" by crafting class allocators or handles or similar devices...
January 18, 2010 at 1:12 PM