Re: Re: RFC: Nested Classes

From: Date: Thu, 24 Apr 2025 14:31:44 +0000
Subject: Re: Re: RFC: Nested Classes
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi

On 4/20/25 15:43, Rob Landers wrote:
As it seems that discussion has mostly died down, I'd like to put this towards a vote starting on May 1, 2025.
Unfortunately I did not have the time to follow the discussion after mid-March, so this might or might not have been discussed already. I just skimmed the RFC and a big issue from my PoV is the interaction of private nested classes and the shared namespace. All existing private symbols in PHP are “invisible” or “non-existent” from the outside for all intents and purposes. As an example, it is possible to add a new private method to a class, without having an effect on child classes that already defined a method with the same name. To my understanding this is different with private nested classes. A private nested class will “block the name” in the global class table, leading to naming conflicts with something the user shouldn't even know exists (because it's private). This is a reason for me to vote against the RFC and a reason why I preferred Ilija's “file private” classes that are much simpler to reason about. Best regards Tim Düsterhus

Thread (102 messages)

« previous php.internals (#127183) next »