On 13 Jul 2014, at 16:28, Rouven Weßling <m...@rouvenwessling.de> wrote:

> On 13 Jul 2014, at 17:05, Andrea Faulds <a...@ajf.me> wrote:
> 
>> On 13 Jul 2014, at 16:00, Rouven Weßling <m...@rouvenwessling.de> wrote:
>> 
>>> One thing however seems like a rather bad idea, and that is exposing the 
>>> type of resource in this way. Resources are not compatible between each 
>>> other, making such a hint not very useable. If people start adding this 
>>> hint to their methods it will also make it much harder to change resources 
>>> into objects (like it has been done for gmp and I have a pull request for 
>>> hash)
>> 
>> Those are good points. Is there any sane way to hint for them, then?
> 
> I don’t think so. I suggest leaving them out for now. I hope we’ll see mores 
> resources converted into classes but if that doesn’t happen hinting for 
> resources can still be addressed later.

I agree, and after asking Anthony about it, I’ve removed the resource type hint 
from the RFC and patch. Besides, it isn’t really a scalar type (in its 
semantics, at least) anyway, and there’s no cast operator for it.
--
Andrea Faulds
http://ajf.me/





--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to