4 ms·
Bevy absolutely allows circular data structures and I’d be surprised if any complex game ships without any - Entity references can easily be circular. Most ECS
by harles 3y ago
Bevy absolutely allows circular data structures and I’d be surprised if any complex game ships without any - Entity references can easily be circular. Most ECS frameworks are their own memory manager which, sure, prevents running afoul of the borrow checker at compile time but not in spirit.
Dangling pointers, null references, and duplicate mutable references all creep into an ECS. They just have new names since it’s all hidden behind Entity rather than a reference or pointer.
- pshc 3y agoIn-game structures can of course be circular, logically speaking, by constructing a chain of entities and components that circularly reference each other by entity ID. But you're saying that Bevy has classic pointer-backed reference cycles? That's news to me.