Re: Mixed type-hint

From: Date: Fri, 08 Feb 2019 15:09:30 +0000
Subject: Re: Mixed type-hint
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-104316@lists.php.net to get a copy of this message
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 <robert@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 <robert@korulczyk.pl > <mailto:robert@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 > > >

« previous php.internals (#104316) next »