Re: Final anonymous classes
| From: | Tim Düsterhus | Date: | Wed, 18 Oct 2023 12:26:36 +0000 |
| Subject: | Re: Final anonymous classes | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121382@lists.php.net to get a copy of this message | ||
Hi
On 10/17/23 19:06, Daniil Gentili wrote:
Personally, I would have instead preferred the much cleaner approach of making *all* anonymous classes final by default, (preferrably) without offering the option to make them non-final. However, I understand that this might be a little bit too restrictive for something that may have some valid usecases, even if extending anonymous classes currently requires some hack-ish workarounds with class_alias.Perhaps make it two votes, each requiring a 2/3 majority? 1. Allow the 'final' keyword on anonymous classes? 2. Enforce that all anonymous classes are final? Best regards Tim Düsterhus