Consider renaming entity::Allocator
#89
Labels
A - Storage
Area: Storage inside a World.
C - Code Quality
Category: Addressing quality and cleanup of existing code.
P - Low
Priority: Not particularly urgent.
I'm not in love with the use of "Allocator" in this context. It conflicts with the other regular usage of the word "allocator" in relation to heap allocations, which I imagine would only be confusing for someone looking at this library's private API with fresh eyes.
The function of the
entity::Allocator
is to store the locations of entities (meaning their current archetype and index) using a generational index system.allocate()
andallocate_batch()
find a free location slot and register the entity's location there, while the other methods simply return the current location or modify that location.So perhaps
entity::Index
orentity::Map
would be better? Orentity::LocationMap
? "Map" denotes key-value, and the current system is just a bunch of locations keyed by generational index (entity::Identifier->
Location`).The text was updated successfully, but these errors were encountered: