Re: [RFC] Static class
| From: | Bilge | Date: | Mon, 08 Jul 2024 12:21:44 +0000 |
| Subject: | Re: [RFC] Static class | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124288@lists.php.net to get a copy of this message | ||
On 08/07/2024 12:48, Alexandru Pătrănescu wrote:
On Mon, Jul 8, 2024 at 1:12 PM Stephen Reay <php-lists@koalephant.com> wrote:So really the question should be: why do you feel the need to *disallow* a combination that has no technical issues, and works already? If you're going to disallow abstract why not disallow any class inheritance at all? Because that's what abstract relates to: class hierarchy. Why remove some support but keep the rest?The reason to remove abstract was because it was thoughtstaticmeans the same asabstract. That is, neither can be instantiated. However, clearly that is short-sighted as Alex's example proves. That is, we cannot simply replaceabstractwithstaticbecause that precludes us from having an incomplete definition where some methods are still not yet implemented. As such, I am quite convinced by your arguments, and will make the change to addabstractsupport back in; mainly because removing abstract support defies our fundamental razor (it's something we can already do).
If we support inheritance for static classes, we should allow static on both interface and abstract classes.
What do you mean by /allow static on [...] interface/? Are you saying you also expect to see static interface support? (This is something I am absolutely not considering at this time, without a very good argument in favour of).
Cheers,
Bilge