Re: [RFC][DISCUSSION] Allow abstract function override
| From: | Marco Pivetta | Date: | Wed, 01 Mar 2017 07:15:58 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Allow abstract function override | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98366@lists.php.net to get a copy of this message | ||
An abstract function is a partial interface: I see no value in adding
exceptions to interface implementations, especially if you add that:
* only works with abstract classes, not interfaces
* has a too narrow use-case scenario (need more necessity and scenarios
with common patterns)
* just write a different interface if it doesn't match what you are doing
* if an abstract class doesn't fit your scenario, just don't extend from it
* proxying would cause calls to the same methods anyway (on a parent class
or a delegate instance), so parameter and return types should match
exactly, or else you incur in type-juggling-hell (the proxy example is moot)
On 1 Mar 2017 3:21 a.m., "Wes" <netmo.php@gmail.com> wrote:
> Hello internals, I've just created a new RFC, you can read it at:
>
> https://wiki.php.net/rfc/allow-abstract-function-override
>
> Note: I have absolutely no idea how difficult implementing this would be,
> as I have no C/internals knowledge. Thus, patches are very welcome - thank
> you in advance if you intend to work on it!
>
> Regards, Wes
>