Make logical AND explicit in filters with an And<(..)>
combinator
#9347
Labels
A-ECS
Entities, components, systems, and events
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
X-Controversial
There is active debate or serious implications around merging this PR
What problem does this solve or what need does it fill?
The usage of
(..)
in query filters is inconsistent with the usage of(..)
everywhere else in bevy. In other APIs likeBundle
,WorldQuery
,IntoSystemConfigs
,IntoSystemSetConfigs
etc. tuples are just a means to express variadics which rust lacks at the moment. They do not have special meaning on their own.What solution would you like?
Add an explicit
And<(..)>
combinator and make the meaning of tuples in filters be consistent with the meaning of tuples elsewhere in bevy.Additional context
Any time any changes need to be made to filters there seems to be inevitable boolean algebra bike shedding because of this inconsistency like in #9255. This is always because people come in with different mixed notions of what
(..)
means which is either:(..)
outside query filters in the mentioned APIs.AND
. Using tuples to implicitly mean logicalAND
. Informed by what is currently uniquely the status quo for query filters.Decoupling these and making distinct mechanisms for each stops this pattern from occurring.
The text was updated successfully, but these errors were encountered: