Hi Jordan,

On Wed, Jul 28, 2021, 10:02 AM Jordan LeDoux <jordan.led...@gmail.com>
wrote:

> Intersection types are very useful if you use composition over
> inheritance. That is, in PHP, they are most useful when you are using
> multiple interfaces and/or traits to represent different aspects of an
> object which might be present. For example, using an actual library I
> maintain, I have a concept of different number type objects.
>

Thanks for the detailed explanation. I do use them for very specific things
(similar to your examples, for shapes).

However my question was more about the rush for it, those are not easy to
implement nicely, given the actual use cases, I am not sure it was worth
this hurry. And I have the same feeling for this discussion about nullable
intersection.

best,
Pierre

>

Reply via email to