-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and events
Description
Why have you opted to use strings as labels in Bevy's APIs? It seems strictly less expressive than using ZSTs for the same purpose.
struct DoThings;
App::build()
.add_stage_after(Update, DoThings)
.add_system_to_stage(DoThings, something.into_system())
- Type checking
- It's not huge, but tracking down bugs stemming from little typos is annoying
- Scoping
- Types can be completely private to specific modules, allowing an implementation to pop implementation details into the ECS without needing to worry about it being observable. (This is just an extension of the same principle in Rust's sound/correct APIs)
- Documentation
- This creates a clear location for the developer to document the purpose of the label, which can be found easily with editor definition jumps
rozgo, zicklag, aevyrie, jetp250, minecrawler and 1 more
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and events