On 25/01/2018 18:56, Michael Morris wrote:
Ok, let's stay on topic please. This RFC discussion is about an operator or family of functions to verify that a given $var is a collection. Objects which enforce collection integrity is a tangential but whole other topic outside the scope of what I proposed in the first post.
Well, it's more convergent than tangential: if Derick's "generics-lite" were implemented, the desire for a collectionof operator might be lower, because people would "$foo instanceof Collection<Bar>" instead.
That said, the two don't cover all the same use cases, but it's useful to ask the hypothetical question "if we already had generics, would we still be keen to add the collectionof operator?"
Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php