Re: [RFC] Mixed type

From: Date: Fri, 24 Apr 2020 15:15:29 +0000
Subject: Re: [RFC] Mixed type
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-109831@lists.php.net to get a copy of this message
I personally would stick to mixed. It's used extensively in the official PHP documentation and has grown with the language. Heck, even static analysis tools and billions of PHPDoc comments (e. g. Laravel, CakePHP, Yii) use mixed type. Switching to any just doesn't feel right. Oh and well, I also think that mixed makes more sense. Best regards, Benas Seliuginas ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Friday, April 24, 2020 5:48 PM, Markus Fischer <markus@fischer.name> wrote: > On 24.04.20 16:33, Bob Weinand wrote: > > > Actually, > > Really had to laugh, reading your previous and then this mail :-) > > > I forgot that for proper generics implementations, collections etc. will obviously need to > > specify "allowing any type". As such the introduction of mixed is pretty much necessary. > > As in class Foo<A, B> { … } $foo = new Foo<mixed, int>; > > As such, I'm actually in favor of introducing it. > > Re-quote: > > > "allowing any type" > > That would make the case for theany type instead of mixed; IMHO > much > more clear. > > - Markus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.internals (#109831) next »