Anders429 / Anders429/brood

Consider renaming `entity::Allocator`

Đang mở
#89 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
A - Storage C - Code Quality P - Low
Ngôn ngữ chính
Rust
Star
41
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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()` and `allocate_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` or `entity::Map` would be better? Or `entity::LocationMap`? "Map" denotes key-value, and the current system is just a bunch of locations keyed by generational index (entity::Identifier` -> `Location`).

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.