Re: Interface inheritance
| From: | Christian Schneider | Date: | Mon, 19 Apr 2004 10:28:51 +0000 |
| Subject: | Re: Interface inheritance | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9370@lists.php.net to get a copy of this message | ||
Zeev Suraski wrote:
1. First of all, I agree that in a perfect world we should go with E_COMPILE_ERROR for everything. Maybe now that's constructors are outI'm not sure I understand what you mean by everything.
whole interface/abstract/class type hints mechanism was added for the sole reason of enforcing prototypes, and effectively, it is pretty muchConcerning interface/abstract classes I can see you reasoning for enforcing the prototype. Personally I don't feel like using interfaces and abstract classes but as it is implemented in PHP5 it should be done right. Make whips and chains people suffer fully from their bondage addiction :-) For class type hints (this is specifying the parameter type in your function definition, right?) I think it should be enforced for *calling* but not for extending. A specialized class often leaves out parameters of the generic base class. E.g. db_record_foo may extend db_record which takes the table as an argument which will always be foo for the specialized class and hence left out there. Does that make sense? - Chris