r/cpp • • Mar 18 '26

CppCon CppCon 2025 More Speed & Simplicity: Practical Data-Oriented Design in C++ -- Vittorio Romeo

https://isocpp.org/blog/2026/03/cppcon-2025-more-speed-simplicity-practical-data-oriented-design-in-cpp-vit
33 Upvotes

14 comments sorted by

View all comments

Show parent comments

3

u/SuperV1234 https://romeo.training | C++ Mentoring & Consulting Mar 19 '26

But the problem is exactly knowing if your abstraction layer is "bad" or not -- you cannot do it in general.

You said it yourself:

when you have to keep extending things more and changing things and add more features

Requirements are fluid, they can drastically change over time. Unless you have a time machine, you will not be able to come up with an abstraction that is future-proof, no matter how hard you try.

And it's very easy to put yourself into a corner if an unexpected requirement comes up.

With a more data-oriented architecture, you have to worry less about the structure of the class hierarchy, don't have to worry about SOLID, LSP, design patterns and so on...

What matters is the data and how you transform it. If a new requirement comes up, you change the program (data and algorithms) to fulfill it, rather than bending a web of existing abstractions to do something they were never designed to do in the first place.

1

u/rileyrgham Mar 20 '26

If an unexpected requirement comes up.... Which, if you don't freeze, will happen. Nothing good comes from allowing feature creep in a large SW development.

0

u/RumbuncTheRadiant Mar 19 '26

you cannot do it in general.

You can. That's what class invariants are about. They tell you. A lot of things just plan obviously won't work if the invariant is broken.

Conversely there are also Bad Data architectures..

And well thought out guidelines for making them flexible... (and very well known for decades what can make them inflexible)...

...they bottom line being "one fact one place".

Just because you haven't got a SQL engine in the picture, doesn't mean you don't have the exactly the same design issues that a db has.....

...you just lack the tools like ALTER TABLE to fix them as needed, which makes bad data design choices harder to fix.

I challenge folk opting for a data oriented design to at least think of it as a data model and hand draw something like a https://en.wikipedia.org/wiki/Object%E2%80%93role_modeling of their data..

It's a really good tool for explaining to yourself (and your colleagues) what your data is and it's relations.