News for hackers. Stuff that matters.
Re:Data-oriented design or why you might shoot yourself in t... by HelloNurse on Monday June 28, 2021 @08:09AM (#27660808)
But not destructuring objects into SoA memory layouts is a "principle", since the availability of pointers to objects is rather fundamental for all OO "specific languages".
Re:Data-oriented design or why you might shoot yourself in t... by corty on Monday June 28, 2021 @08:21AM (#27660909)
> But not destructuring objects into SoA memory layouts is a "principle"

No, not really. There are languages that allow inside-out-objects where the "object" is a tuple of (class, index). The class holds a bunch of arrays containing each object's properties at the index-position that the object indicates. Totally destructured, yet holds all the usual OO "principles" like implementation hiding, abstraction, access via objects, etc. https://metacpan.org/pod/Object::InsideOut

This is exactly what I meant with "there are no OO principles". Noone has a clear-cut set of those and almost anything can be made to fit some set of "OO principles".

Re:Data-oriented design or why you might shoot yourself in t... by jhgb on Monday June 28, 2021 @12:07PM (#27663672)
> since the availability of pointers to objects is rather fundamental for all OO "specific languages".

I don't see how that is the case. For example some implementations of Smalltalk used object tables, so there were no "pointers to objects", just numerical object IDs. The physical interpretation of such IDs could get very arbitrary.

Re:Data-oriented design or why you might shoot yourself in t... by mytailorisrich on Monday June 28, 2021 @09:06AM (#27661415)
This is not specific to OO and is not an OOP principle. As soon as you have data dynamically allocated in memory and you start passing pointers to them around you have to be careful.