Hi!

Also, it never makes sense to convert one object type into another, and
almost never this operation can be defined.


array and ArrayObject?

This is a good example because strict typing would probably reject ArrayObject passed as array, thus defeating the whole purpose of having ArrayObject. That's exactly why we have to be very careful with strict types in dynamic language - because it makes excellent dynamic extensions line ArrayObject, __toString, etc. useless - since you can not really use one type instead of another as they intend, strict typing kills that.
Coercive typing, on the other hand, would work just fine with those.

I mean it's too late to argue about that the current type hinting triggers
an error in case of type mismatch.

Actually we could change it if we wanted to, I don't believe there's really some code that relies on it being error for some functionality. The question is what we'd change it to, for which I have no good answer.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to