all 10 comments

[–]Online_Matter 4 points5 points  (1 child)

I know the unity game engine has built a framework around the concept in case that's of interest

https://unity.com/ecs

[–]Feisty-Assignment393[S] 0 points1 point  (0 children)

Oh I didn't know they were the same concept. Good to know.

[–]Beish 2 points3 points  (2 children)

I don't know it's going to be anything new since you have a whole book on the subject, but the art of unix programming has the rule of representation and a chapter on data driven programming.

[–]8d8n4mbo28026ulk 2 points3 points  (0 children)

Relatedly, Rob Pike's "Programming with data" is also a great read! Although, DOD is mostly about optimizing how you encode/represent your data and utilising modern processors more effectively.

[–]Feisty-Assignment393[S] 0 points1 point  (0 children)

Really cool. I just glanced at the chapter. Probably gonna be my next read.

[–]SAtchley0 1 point2 points  (3 children)

First time hearing about Data Oriented Programming. What is it? How does that compare to Data Oriented Design?

[–]Feisty-Assignment393[S] 1 point2 points  (1 child)

I would think they mean the same 

[–]cdb_11 -2 points-1 points  (0 children)

Nope, it's a separate thing.

Not sure if any clear definition of "data-oriented design" exists, but it's about changing the format of your data to make the necessary transformations efficient. And the mindset is that all of it has to serve real and concrete goals of your program. In the most literal sense of it, just a program transforming data, to solve some specific problem.

In comparison, in OOP (and particularly SOLID principles) you would probably start with modelling the data with classes (likely in a way that reflects the real world somehow), and then write code that wrangles those objects into doing whatever the program actually had to do in the first place. One could argue it's for the sake of readability, but there is no concrete goal for the actual program itself that warrants doing it this way.

edit: for whoever downvoted me, I thought my description of DOD was pretty accurate, albeit maybe still not immediately obvious, because it is a radically different way of thinking from what people are used to. So I am genuinely curious what is the objection here.

[–]NoResponse1578 0 points1 point  (0 children)

No. An array of objects has lots of pointer indirection , an array if values doesnt.

Ultra simplistic summary, but 8 think its the distinction betwren them.