Skip to content
Discussion options

You must be logged in to vote

World access is required during system state initialization in order to generate all of the metadata needed to set up the system machinery.

World acccess is required when using system state in order to actually get the data from the world. We can't look it up by world_id, because that's just a dumb identifier: we need some sort of reference to the world data.

That said, we could improve boilerplate here by adding methods to initialize and get the system state immediately. The SystemState won't be cached anywhere (which is a nice micro-optimization), but it reduces the annoyance for cold work. World::get_system_state would probably be my preference; there's no point adding an immutable for…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MeoMix
Comment options

@alice-i-cecile
Comment options

Answer selected by MeoMix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants