Description
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 like Bundle
, 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:
- Var args. Using tuples to work around rust lacking variadic generics. Informed by the encounters of
(..)
outside query filters in the mentioned APIs. - Logical
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.