Hi!

I'm going to have to disagree with you there.  Type hinting DOES save
me a LOT of effort in development.  I can stop worrying about checking
to make sure the parameter that I got is what I want it to be, and
just use it.  The runtime will check and enforce that for me.  When

I'm sorry but I don't see how what you describe is good. You stopped worrying about checking inside the function, but unless you have started checking outside the function you've just made your code less robust that it was before. While in the case of strict class typing the case of mismatched classes is so rare that occasional failure is easily identifiable, you didn't really improve your code. I agree that it makes you type less - but the cost of it is your application also does less - you don't have a capability of gracefully handling a problem any longer. Again, with object strict typing, this might be OK since failures are very rare and usually a result of obvious mistakes caught early in testing - but if they are not, you didn't really gain much.
--
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