Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Extend for World #14

Open
Anders429 opened this issue Jan 8, 2022 · 2 comments
Open

Implement Extend for World #14

Anders429 opened this issue Jan 8, 2022 · 2 comments
Labels
A - Storage Area: Storage inside a World. C - Enhancement Category: New feature or request. P - Low Priority: Not particularly urgent. S - Blocked on Rust Feature Status: Cannot continue without a Rust feature being stabilized. S - Needs Investigation Status: Further investigation is needed. V - Minor Breaking Change Versioning: Requires a minor bump according to semver.

Comments

@Anders429
Copy link
Owner

Anders429 commented Jan 8, 2022

It may be possible to generically implement Extend for World in a generic way that allows for extending from any iterator that yields values implementing Entity. If this is found to be possible, IntoIterator could also be implemented for Batch<Entities> (which still needs to be renamed, by the way), allowing extend to work with that struct.

One main issue is that our current extend method returns EntityIdentifiers corresponding to the inserted values. This would not be possible with the Extend trait. At the very least, however, Batch<Entities> should be made to implement IntoIterator, and also should work with inputs besides Vec.

@Anders429 Anders429 added the C - Enhancement Category: New feature or request. label Jan 8, 2022
@Anders429 Anders429 linked a pull request Aug 24, 2022 that will close this issue
@Anders429 Anders429 added S - Needs Investigation Status: Further investigation is needed. P - Low Priority: Not particularly urgent. A - Storage Area: Storage inside a World. labels Sep 15, 2022
@Anders429
Copy link
Owner Author

This is basically blocked on specialization. The pull request I put together (#96) is getting stale as the API expands and grows in other ways, and as it currently stands, that PR isn't going to be merged anyway due to the performance regression present.

@Anders429 Anders429 added S - Blocked on Rust Feature Status: Cannot continue without a Rust feature being stabilized. V - Minor Breaking Change Versioning: Requires a minor bump according to semver. labels Jan 25, 2023
@Anders429
Copy link
Owner Author

This may be something worth addressing again. I've recently been working on following the rustrogueliketutorial, using brood in place of specs wherever necessary. This has been enlightening in many ways, as it leads me to see weaknesses in the API and feature set from a user perspective.

One of the things I have seen is that using World::extend() is currently very limiting. Either you have a static set of component columns, or you don't, and that ends up being rather inflexible.

It is likely worth looking at this again to see if there is any way to make this more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - Storage Area: Storage inside a World. C - Enhancement Category: New feature or request. P - Low Priority: Not particularly urgent. S - Blocked on Rust Feature Status: Cannot continue without a Rust feature being stabilized. S - Needs Investigation Status: Further investigation is needed. V - Minor Breaking Change Versioning: Requires a minor bump according to semver.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant