On Mon, 2008-01-07 at 19:45 +0100, Stefan Priebsch wrote:
> Robert Cummings schrieb:
> > The onus should be on consumers of my API to use it properly, not on me
> > to jump through hoops to make sure they gave me the correct data at
> > every step of the way. I stopped holding hands in grade 3 or so.
> 
> Still you force any defensive coder to repeat explicit type checks and 
> type casts all over whenever one of your API functions is called.

That depends. If you look back in time at the messages on the list
you'll see I argue for the use primarily within libraries/frameworks and
not so much for general user consumption. For instance, if you extend a
class in my API and override methods and such, I expect the data you
pass to me is of the correct type when you call parent::someMethod().

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

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

Reply via email to