On Tue, Feb 4, 2025, at 3:16 PM, Larry Garfield wrote:

> Patterns are deliberately designed as a superset of existing DNF types. 
>  You can already have a type of Foo&Bar, so we want the pattern for 
> "instanceof Foo || instanceof Bar" to be the same.  That means & and | 
> for conjunctions is necessary.  Also supporting "and" and "or" would 
> technically be possible, but wouldn't resolve the issue (since & would 
> still be needed either way) and would just add more complication, 
> confusion, and inconsistency.  I don't think that's viable.

And that of course should be "$x instanceof Foo && $x instanceof Bar" in the 
equivalent example.  My bad.  (Though the point applies for |, ||, or, just the 
same.)

--Larry Garfield

Reply via email to