Re: Feature Discussion |

From: Date: Tue, 10 Jun 2025 19:45:46 +0000
Subject: Re: Feature Discussion |
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-127636@lists.php.net to get a copy of this message
Thanks for participating, Larry. On Mon, Jun 9, 2025 at 10:29 PM Larry Garfield <larry@garfieldtech.com> wrote: > 2. Please link to a PR of your actual implementation. In context it looks > like your branch comparison link is to the version you said didn't work, so > it's not that helpful. > Correct, I don't have another one. This is big feature, I need a lot of time to implement it. I don't want to waste my time if we decide that RFC won't pass at all. > 3. The biggest question that has come up in the past (Ilija and I have > discussed it at length) is, naturally, autoloading. How if at all do you > address that? > In the original message I mentioned use extension construction. This should be enough for solution, isn't it? > 4. The other big question was determining when to match a given "method" > call to an extension function, when the type of a variable is not always > known at compile time. How did you address this? > Cannot understand the passage, could you explain more? The only one way to use these extension functions – import them. namespace A { use B\Foo; function Foo::hello(){...} function Bar::hello(){...} <---- Error, unknown Bar class } namepsace B { class Foo {} new Foo->hello() <--- Error, hello() is not a member of Foo } namepsace C { use B\Foo; use extension function A\Foo::hello; new Foo->hello() <-- Everything's great } -- Best regards, Dmitrii Derepko. @xepozz

« previous php.internals (#127636) next »