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

Improved trait system #108

Open
makspll opened this issue Apr 4, 2024 · 0 comments
Open

Improved trait system #108

makspll opened this issue Apr 4, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@makspll
Copy link
Owner

makspll commented Apr 4, 2024

Currently the Bevy API is generated mostly with the help of meta-programming, it would be better to have a smart trait system and smaller macros.

We could create a UserDataMethodsExt trait which would have the same interface but have different bounds on the arguments (namely LuaProxyable or equivalent)

Alternatively we could have some sort of Proxy and Unproxy trait pair, which given a system for controlling world access to components at runtime, could collect the required accesses and then carry out wrapping and unwrapping automatically.

This would solve a lot of the current problems including the lackluster support for collections, results, options etc (we could just implement Proxy and Unproxy for these)

@makspll makspll added this to the 2024 Goals milestone Apr 5, 2024
@makspll makspll added the enhancement New feature or request label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant