It is just a (draft) proposal. Anyway, the RFC does not force you to
declare a mixed type but brings an option for who wants to.

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

> There is no reason to introduce `mixed` type-hint if it does not provide
> any validation and works the same as no type-hint at all.
>
> Regards,
> Robert Korulczyk
>
> W dniu 08.02.2019 o 15:54, Marcos Passos pisze:
> > Those cases should be handled with runtime validation, there is no
> reason for changing the concept of mixed.
> >
> > On Fri, Feb 8, 2019 at 12:39 Robert Korulczyk <rob...@korulczyk.pl
> <mailto:rob...@korulczyk.pl>> wrote:
> >
> >     > Could you clarify on a use-case for changing the semantics of
> `mixed`?
> >
> >     For example storage which does not allow to store null. Like simple
> cache which treats null as "miss", so it is not able to cache null as value.
> >
> >     Obviously it is not a deal breaker and use case is quite rare
> anyway, but this is just example when mixed type-hint may work as actual
> type-hint, not
> >     just replacement for PHPDoc or equivalent of... nothing.
> >
> >
> >
> >     Regards,
> >     Robert Korulczyk
> >
> >     --
> >     PHP Internals - PHP Runtime Development Mailing List
> >     To unsubscribe, visit: http://www.php.net/unsub.php
> >
>

Reply via email to