I agree.

On Wed, Apr 20, 2016 at 2:01 PM, Sara Golemon <poll...@php.net> wrote:

> On Tue, Apr 19, 2016 at 7:56 PM, Jesse Schalken <m...@jesseschalken.com>
> wrote:
> >> class Collection<T as (Traversable | Countable)> {...
> >
> > I think the "where T is Traversable, T is Countable" syntax was intended
> to
> > represent the intersection (i.e. a "Countable Traversable"), not the
> union.
> >
> > So you would need an intersection syntax
> >
> > class Collection<T as Traversable & Countable> {...
> >
> And that's precisely my point for why reusing the suggested syntax for
> union types makes sense.  You can to specify either intersection or
> union (or potentially a complex combination of the two (A | (B & C))),
> rather than being limited to intersections only.
>
> -Sara
>

Reply via email to