> Ok, but a scalar becomes useful for a couple of important things.
> Scalars are all displayable values, that can be stored in a db,
> outputted, etc. The scalar type hint prevents errors related to objects,
> resources, and arrays attempting to be stored in the db or echoed.
True, but honestly I do not see a whole lot of use for this. In a word, it is 
very limited. _Too_ limited to be truly useful in my opinion. It is simple 
statistics; there is more need for specific types than scalars in general, 
when using type hinting.

I do agree that it is a good idea to allow for type hinting scalars in 
general, but it should not be considered a solution. It is more like a 
comfortable add-on.

And to be frank, this really feels like a secondary price (bronze at most). If 
pressed I would go bold say that this really feels like a screw. A way of 
saying that we went out of our way to fix this feature that was limited by 
adding a seemingly useful attribute to it, but in the end still leaving the 
feature limited and not really fixing anything.

Tomi Kaistila
PHP Developer

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

Reply via email to