Competing naming conventions for types
Some traits have competing naming conventions for types within Bevy:
| Trait | Suffixes used | Suggestion |
|---|---|---|
SystemSet |
System, Set, Systems, no-suffix |
Not obvious which to choose, probably Set |
Primitive3d |
3d, 3, 3A, no-suffix |
Probably fine as-is |
Primitive2d |
2d, 2, no-suffix |
Probably fine as-is |
Event |
Event, no-suffix |
Probably fine as-is |
ScheduleLabel |
Schedule, no-suffix |
Just rename ExtractSchedule |
RenderLabel |
Label, no-suffix |
Just rename CameraDriverLabel |
SystemParam |
Param, no-suffix |
Just rename UiLayoutSystemRemovedComponentParam |
PluginGroup |
Plugins |
:white_check_mark: (not counting PluginGroupBuilder) |
Plugin |
Plugin |
:white_check_mark: |
Bundle |
Bundle |
:white_check_mark: |
AppLabel |
App |
:white_check_mark: |
System |
System |
:white_check_mark: |
Material |
Material |
:white_check_mark: |
Component |
no-suffix | :white_check_mark: |
Resource |
no-suffix | :white_check_mark: |
Command |
no-suffix | :white_check_mark: |
Asset |
no-suffix | :white_check_mark: |
States |
N/A | :white_check_mark: (no types provided by Bevy) |
EntityCommand |
N/A | :white_check_mark: (no types provided by Bevy) |
Hard to search for because no distinguishing trait:
- Observable events
- Marker components
Event, Primitive2d, and Primitive3d are probably "fake inconsistent" and fine to stay as they are. So this can be narrowed down to SystemSet and three odd-one-out type names.
Can you explain more about what you think should be done in all of the inconsistent cases?
I've edited the original comment with more context.
Evaluating the options for SystemSet
FooSystems:
+ Parallels `Plugins` for `PluginGroup`
+ Unambiguous
- Longest option (besides `SystemSet` as a suffix...)
- Used by 2/20 bevy system set types: `SimulationLightSystems` and `VisibilitySystems`
- Rarely (never?) used by 3rd-party crates
FooSystem:
+ Used by 10/20 bevy system set types.
+ Used by 3rd-party crates sometimes
- Still long
- Ambiguous (is it a system or a system set?)
FooSet:
+ Very short
+ Commonly used by 3rd-party crates
- Used by 2/20 bevy system set types: `RenderSet` and `ExtractMeshesSet`
- Ambiguous (is it a `SystemSet` or a set of `Foo`?)
Foo:
+ Shortest possible
+ Used by 6/20 bevy system set types
- May conflict with names of related types
- Not obvious that it's a `SystemSet`
- Rarely used by 3rd-party crates
I'm leaning Set for system sets, but it's not an obvious decision.
I fully agree with the suggestions presented here. They seem reasonable and applicable. Especially the SystemSet inconsistency is a potential documentation hazard since users might not know what to search for.
My preference is Set as well.
There seems to be some sentiment on Discord in favor of Systems for system sets (from cart, Jondolf, and mweatherley: link). I'm personally still on the fence but I think avoiding the ambiguity of FooSet may be worth the extra length.
Could make SystemSet short via SysSet since everyone knows Sys is abbreviation for system
Abbreviations like that are slower to read and very confusing for beginners / non-native speakers.
I agree. Abbreviations are generally detrimental, in my opinion. It's much easier to write code than to read it. Why make it harder to read?
A Discord poll resulted in 26-1-27-3 votes for FooSystems vs FooSystem vs FooSet vs Foo.