News for hackers. Stuff that matters.
Re:Data-oriented design or why you might shoot yourself in t... by jayd16 on Monday June 28, 2021 @10:56AM (#27662791)
Why are we always so dogmatic?

Struct of Arrays is a great pattern if you need the speed and have enough items to make it worth it. Otherwise just use OOP. Are you going to make an array of singleton data? No, of course not.

>How many places in the code did you have only one of something?

One socket, one host, one pool, and assuming a single player game, there are a lot of ones...

Just relax and use the strengths of both patterns.

Re:Data-oriented design or why you might shoot yourself in t... by gambiter on Monday June 28, 2021 @11:33AM (#27663221)
> Just relax and use the strengths of both patterns.

That's exactly what he says in the conclusion...

Re:Data-oriented design or why you might shoot yourself in t... by jayd16 on Monday June 28, 2021 @11:41AM (#27663331)
Agreed. I'm saying we as in the HN comments and to some degree programmers in general.