Re: Interface inheritance
| From: | George Schlossnagle | Date: | Tue, 20 Apr 2004 16:20:11 +0000 |
| Subject: | Re: Interface inheritance | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9430@lists.php.net to get a copy of this message | ||
On Apr 20, 2004, at 11:39 AM, Ferdinand Beyer wrote:
On 20 Apr 2004 at 11:22, George Schlossnagle wrote:Everything works fine if you except that 'scalar' is a base type and that int, string, etc. are not.PHP doesn't support this, regardless of you being able to tell them apart, scalar types in PHP are isomorphic.Yes, I know. This is why I am against strict parameter checking.
If you need to change the interface then you shouldnt be implementing it.interfaceProvided that one has access to the interfaces...I must not understand this comment. How can you implement anyou don't have knowledge of?I meant in some cases you cannot change the underlying interface or base class. Classes in third-party libraries or internal classes, for example.
Then you aren't implementing the interface. The interface is a contract, you can't enforce it with variable arguments. GeorgeThe fact is that since PHP doesn't support parameter basedmethoddispatching, you _can't_ implement both A and B, since you cannotcomply with both signature contracts simultaneously.IMO I should, using variable arguments. This is currently impossible.