-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or change
Description
What problem does this solve or what need does it fill?
Following #4219, system function types can be used directly as labels.
This removes the last serious use of strings as labels: for "quick and dirty" implementations.
"Stringly typed" labels are inferior because:
- They are not IDE or compiler aware, and so typos are very challenging to detect.
- They can clash in very surprising ways between crates.
- They cannot be kept private.
What solution would you like?
- Remove the ability to use string types as labels.
- Update codebase, including examples and tests, to reflect this change.
Additional context
Note that labels that store a string may be useful in some applications for e.g. scripting integration. This is still supported: you just have to newtype your string.
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-Code-QualityA section of code that is hard to understand or changeA section of code that is hard to understand or change