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

IWorld <> WorldContext interfaces #883

Open
holic opened this issue May 17, 2023 · 1 comment
Open

IWorld <> WorldContext interfaces #883

holic opened this issue May 17, 2023 · 1 comment

Comments

@holic
Copy link
Member

holic commented May 17, 2023

  • Should IWorld include WorldContext methods in its interface? (e.g. via an IWorldContext)
  • Can we overload IWorld's usage of WorldContext methods to return _world() as IWorld rather than address?
@holic holic added this to the Contracts stable milestone Jul 10, 2023
@alvrs
Copy link
Member

alvrs commented Jul 10, 2023

Should IWorld include WorldContext methods in its interface? (e.g. via an IWorldContext)

WorldContext is the base contract for things that are called by the World (mostly System), can you elaborate what the use case would be to add it to the World contract itself?

Can we overload IWorld's usage of WorldContext methods to return _world() as IWorld rather than address?

The reason it returns address atm is that consumers likely want to cast it to their local World (which includes function selectors for all of their registered systems), so if we returned it as IWorld they'd first have to cast it back to address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants