News for hackers. Stuff that matters.
Re:Data-Oriented Design by DeathArrow on Monday July 03, 2023 @10:10AM (#36573107)
As I see it, there are two types of DOD, one that you've mentioned and where you “work on structs of arrays, not arrays of structs”.

The other one means just giving up of encapsulation, separate the data from the methods that work with the data, think the whole app in terms on how the data flows through it and model it so everything is easy to understand and change. For added correctness, you can use immutable data structures and pure functions.

Re:Data-Oriented Design by hohohmm on Monday July 03, 2023 @10:31PM (#36581483)
This is exactly right. Good summary.
Re:Data-Oriented Design by butterNaN on Tuesday July 04, 2023 @03:44AM (#36583516)
Isn't this the very definition of functional programming?
Re:Data-Oriented Design by tsss on Tuesday July 04, 2023 @05:53AM (#36584407)
No. Functional programming is programming with functions as values. It is not incompatible with data hiding (for example through modules).
Re:Data-Oriented Design by butterNaN on Sunday July 09, 2023 @07:19AM (#36653550)
"Programming with functions as values" is merely one of the side effects, a feature, of writing your programs functionally. It does not define the paradigm.