At 14:09 27/05/2010, Ilia Alshanetsky wrote:
Because auto-conversion is magic and like any magic causes in-consistent behaviour and what I like to call WTF factor, which means the developer is not quite certain what is going on. With strict type hints the behaviour is consistent every-time and there is no ambiguity of function.

PHP is a lot about magic, about the thing the language does for you that you don't have to worry about. Memory management, type juggling, letting your overload function calling and property lookup, etc. - all fall in that category. There'll be clear rules as to how type hints would work - it's not as if there'd be a random element to it.

Are you also against __toString()? That's magical at exactly the same level. You can view PHP's scalars as data types that have __toString(), __toInt(), etc. It's exactly the same.

Zeev

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

Reply via email to