Hi! > For non-interchangeable types it is already strict by definition. I > don't see a problem with type hints that make life easier on both the > caller (by generating better error messages) and the callee (by having > to write less boilerplate type verification code).
It doesn't make the life of the caller easier. On the contrary, it makes each call into a minefield - will it blow up with a system-level error when you call it? Added bonus of this one is that there's no sure way to check for it - at least for callable we had is_callable, here we just have to add boilerplate code for every call. And good luck making them handle it in an unified way - since it's not library code, then probably will do each different thing, and about 50% of places will forget it or not know downstream inserted this surprise into the execution stream. > You may have a point on the ad-hoc nature of it and that we need to do > it once and for all in a more organized fashion, but the basic premise > looks ok to me. I think the basic premise (PHP needs more strict typing that it is completely unable to properly handle and that leads to runtime errors that had no choice but blow up the whole app) is wrong, but ad-hoc implementation of it by just dragging random pieces into the type system is even more wrong. Note that no other dynamic language is doing such things. I wonder why. -- 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