Skip to content

Explain 'w and 's lifetimes better in documentation #6953

@harudagondi

Description

@harudagondi

How can Bevy's documentation be improved?

There are a lot of types in bevy_ecs that has the 'w and 's lifetimes:

  • EventReader
  • EventWriter
  • QueryIter
  • QueryManyIter
  • QueryCombinationIter
  • SystemParamItem
  • ParamSet
  • Commands
  • EntityCommands
  • and more...

The best explanation found for these lifetimes are in SystemParam

Solutions I could think of right now:

  1. Rename 'w and 's to 'world and 'state. This is not ideal since this will make the code more verbose.
  2. Link users to the SystemParam documentation. There are a lot of types to document and imo would add more noise to their documentation.
  3. Put the documentation in the README, perhaps under a new "Advanced topics" sections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-DocsAn addition or correction to our documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions