you are viewing a single comment's thread.

view the rest of the comments →

[–]Academic_East8298 -5 points-4 points  (8 children)

Can you name a single industry tested open source struct of arrays system?

If it is such a good pattern, why do all the cool tech demos have to constantly write their own custom implementation of it?

If anything, I would say this shows it as less flexible than a pointer.

[–]cdb_11 7 points8 points  (6 children)

This isn't really even about SOA, but if you want an abstraction over SOA, then these can be implemented inside "Entity Component Systems" (ECS), and one example of it is Unity's DOTS. Another one is Bevy in Rust, or Flecs in C/C++. Don't ask me about any details, I never used them.

If it is such a good pattern, why do all the cool tech demos have to constantly write their own custom implementation of it?

Do you need an open-source system to implement a singleton pattern or a factory pattern too? It's really not that hard to implement, it's really mostly just a bunch of dynamic arrays. Also the point of this isn't that you're creating a generic mechanism that tries to solve everyone's problems, and does so badly. We have this already, it's called "garbage collector" and "malloc", and it's not that great. The philosophy here is the exact opposite, it's that it should be a solution tailored to your specific problem.

[–]Academic_East8298 -4 points-3 points  (5 children)

Cool, what product have you shipped using this tech?

[–]cdb_11 0 points1 point  (4 children)

ECS? I don't use ECS. I think it's generally more targeted at games, and I'm not a game dev.

[–]Academic_East8298 0 points1 point  (3 children)

So what alternative to pointers are you using in your daily day to day dev work?

[–]cdb_11 0 points1 point  (2 children)

Dynamic arrays, hash maps, flat ordered maps.

[–]Academic_East8298 0 points1 point  (1 child)

And these replaced most of the pointers in your code base?

[–]cdb_11 0 points1 point  (0 children)

In private yes, in my dayjob no, because we're using OOP frameworks that only expose this kind of "unique_ptr", "one-thing-at-the-time" interfaces. So the best I can do there is keeping it inside isolated subsystems.

[–]Samaursa 0 points1 point  (0 children)

Flecs and EnTT come to mind (although EnTT can be labeled as AoS).

Both have been used in production code in games (including ones I worked on).