Re: base class
| From: | Stephane Drouard | Date: | Fri, 23 Jan 2004 10:53:02 +0000 |
| Subject: | Re: base class | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7291@lists.php.net to get a copy of this message | ||
Marcus,
The idea behind this kind of request is to speed up development time. And the way a language and its
base classes are implemented could really help to reach this goal.
When you write "a change is a change", you're right. But the way you have written
your code could really reduce the risk of bugs. And systematically calling parent::... is one of it.
I also understand when you consider as a non sense calling an empty method which slows down
execution for nothing.
Except that personally I really favour develop time rather than execution speed. Upgrading a
computer is less expensive than spending hours to fix bugs.
Implementing a common base class with empty methods (or Chris' proposal, just do not report
error) does not impact performance (just don't call them), but allows people having a different
view on programming to do it.
Finally my request to implement it within PHP would limit the number of class trees, all world wide
classes would have the same base class. Nice OOP vision, isn't it ;-)
Regards,
Stephane