On Fri, 8 Feb 2019, 13:13 Robert Korulczyk <rob...@korulczyk.pl wrote:

> Sounds like an arbitrary interpretation. Treating `?mixed" as "top type"
> (including null) would be more practical and consistent with other
> type-hints.
>

The PHP ecosystem (libraries) already uses `mixed` as a type including
`null`. You can survey for usages of `mixed|null`, which is currently
normalised to `mixed` by existing static analysis tooling (psalm, phpstan).

Even then, by adding a non-nullable almost-top-type doesn't seem helpful:
"here's something random, just make sure it isn't null". That's something
more interesting for an eventual union type RFC (revival?).

Could you clarify on a use-case for changing the semantics of `mixed`?

>

Reply via email to