RE: [PHP-DEV] RfC: rethink OO inheritance strictness
| From: | Soenke Ruempler | Date: | Fri, 21 Jul 2006 11:52:42 +0000 |
| Subject: | RE: [PHP-DEV] RfC: rethink OO inheritance strictness | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-24826@lists.php.net to get a copy of this message | ||
Richard Quadling <mailto:rquadling@googlemail.com> wrote on Friday, July
21, 2006 1:16 PM:
> Ah. I see the difference. I'm expecting overloading. Hmmm. Even with
> that though, overloading is the desired effect.
But PHP has no parameter overloading, only overloading with interceptor
methods. IMHO what you do is "misusing" OOP polymorphism as parameter
overloading. For clearness of your class interface / public API, why
don't you just use another method that accepts other parameters than the
parent's one.
Another possibilty / workaround is no method parameters in declaration
and to use func_get_args().
-soenke