FB>>Impl guarantees that by implementing interface A.

No. It _says_ it implements interface A, but you couldn't know if it 
indeed does, if we allow your model - maybe that "dispatched" function 
call doesn't really accept those arguments? 

FB>>What if Impl::doSomething() would accept exactly two parameters, but
FB>>expects them to be arrays?

Then how can you say it implements B where object is required? 
Since PHP does not dispatch methods by parameters, I don't know if there's 
a good way to implement both A and B interfaces except making all 
doSomething definitions not accept parameters or give them different 
names.

FB>>IMO you cannot enforce this strictness with loose types...

When you use interfaces and typehints, you give up the loose-typedness, 
not? You say "here the types can't be loose - I want exactly this class 
and nothing else in this parameter". 
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115

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

Reply via email to