Re: RFC: short and inner classes
| From: | Juris Evertovskis | Date: | Fri, 07 Mar 2025 16:29:07 +0000 |
| Subject: | Re: RFC: short and inner classes | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-126621@lists.php.net to get a copy of this message | ||
On 2025-03-07 01:48, Rob Landers wrote:
They're not 100% arbitrary, but mostly due to technical limitations. - One level deep: Nesting multiple levels results in ambiguous grammar. - As a parent class: This also results in ambiguity. - Abstract: If it cannot be a parent class, it doesn't make sense for it to be abstract.Hey, I thought that an abstract inner class would be one that a subclass (of the outer class) must implement, not one that must be extended. Similar to abstract methods. But have you considered enums, traits and interfaces? I assume inner classes would work as expected if defined on traits or enums, but what is going to happen if I try to define one on an interface? BR, Juris