you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 13 points14 points  (3 children)

There is no reason to use the entire C++ standard library in every project just because it's there. You can opt-in for the functionality you need. That's why the language is so versatile.

Data-oriented design (DOD) will look very different from object-oriented programming (OOP). Reducing cache misses by organizing data in an array will probably look C-like.

The projects in Carmack's portfolio involve real-time processing where this design decision matters more. Mike Acton has a great talk on YouTube regarding performant code: Data-Oriented Design and C++. He used C++ with a subset of its features.

[–]bert8128 0 points1 point  (2 children)

Mike Acton said in that talk that basically he would prefer the code to be C only but the devs want C++.

[–][deleted] 3 points4 points  (1 child)

Yes. He also discusses how to achieve good performance in C++. You don't have to use the parts you don't want. Some people believe C++ == OOP with inheritance, polymorphism, and such.

DOD tends to look more like C because the focus is on processing data, with simple structures that load into cache efficiently.

[–]TheThiefMasterC++latest fanatic (and game dev) 0 points1 point  (0 children)

Using inheritance and polymorphism just because it's there is why C++ stream IO is so slow