On Mon, Jul 19, 2021 at 4:05 PM Larry Garfield <la...@garfieldtech.com>
wrote:

>
> I can see the argument that "I need something with these two interfaces...
> or nothing" is a valid use case to care about.  However, as Saif noted,
> this is a side effect of the inability to mix union and intersection types.
>
> So, my question would be, how feasible will it be in the future to
> introduce that mixing?  If it's something that is likely to show up in 8.2
> or 8.3, we may be better off going "meh" for now and letting a solution
> fall out naturally later.  If it's something that could take a decade, then
> figuring out a way to special case "or null" in the meantime is probably
> worthwhile.  (I don't know what the best way to do that is.)
>

You made me remember that [we had non-scalar parameter type declarations
since PHP 5, and] we got scalar type declarations and return type
declarations in 7.0 but nullable type declarations "only" in 7.1 (but I
agree).

-- 
Guilliam Xavier

Reply via email to