[PHP-DEV] Generics - Userland implementation via attributes (released today). Discussion and seeking advice for improvement

2025-05-21 Thread Arvids Godjuks
Hello Internals! My friend Grigory has cooked up an exciting package implementing generics with full runtime type checking in userland. I honestly believe it can be surpassed only by doing a full native implementation (which we know is fairly unfeasible from Nikita's previous research), it's trans

Re: [PHP-DEV] Re: [RFC] Clone with v2

2025-05-21 Thread Larry Garfield
On Wed, May 21, 2025, at 9:13 AM, Tim Düsterhus wrote: > Hi > > Am 2025-05-19 12:48, schrieb Volker Dusch: >> We're still looking for feedback on the ...variadic approach to the >> Syntax: >> https://wiki.php.net/rfc/clone_with_v2#open_issues, as we only got one >> reply so far on the topic. > > I

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-21 Thread Hammed Ajao
On Tue, May 13, 2025, 9:32 a.m. Deleu wrote: > Hi! > > It's been a few days since I wanted to send this email to internals, but > real life has been a bit chaotic so I apologize if it comes off as if I > didn't research the archives enough. I glossed over the Module conversation > from 10 months

Re: [PHP-DEV] Re: [RFC] Clone with v2

2025-05-21 Thread Tim Düsterhus
Hi Am 2025-05-21 17:27, schrieb Theodore Brown: Combining named-parameter `array()` syntax with clone taking a array as the second parameter would allow for the following, which might combine the best of both worlds? clone($obj, array(foo: 1, bar: "baz", object: "this is not blocked"));

Re: [PHP-DEV] Re: [RFC] Clone with v2

2025-05-21 Thread Theodore Brown
On Wed, May 21, 2025 at 09:13 Tim Düsterhus wrote: > Am 2025-05-19 12:48, schrieb Volker Dusch: >> We're still looking for feedback on the ...variadic approach to the >> Syntax: >> https://wiki.php.net/rfc/clone_with_v2#open_issues, as we only got one >> reply so far on the topic. > > ... > > *So

Re: [PHP-DEV] Re: [RFC] Clone with v2

2025-05-21 Thread Tim Düsterhus
Hi Am 2025-05-21 16:27, schrieb Nicolas Grekas: Thanks for sharing your insights. This looks a bit far reaching for the RFC. Making `array()` a function / allowing named parameter syntax with `array()` would be a separate RFC. On my side, my opinion is: don't make clone a function call. I'

Re: [PHP-DEV] Re: [RFC] Clone with v2

2025-05-21 Thread Tim Düsterhus
Hi Am 2025-05-19 12:48, schrieb Volker Dusch: We're still looking for feedback on the ...variadic approach to the Syntax: https://wiki.php.net/rfc/clone_with_v2#open_issues, as we only got one reply so far on the topic. I was hoping for some additional opinions here before adding my own, but

Re: [PHP-DEV] Re: [RFC] Clone with v2

2025-05-21 Thread Nicolas Grekas
Hi Tim, Le mer. 21 mai 2025 à 16:15, Tim Düsterhus a écrit : > Hi > > Am 2025-05-19 12:48, schrieb Volker Dusch: > > We're still looking for feedback on the ...variadic approach to the > > Syntax: > > https://wiki.php.net/rfc/clone_with_v2#open_issues, as we only got one > > reply so far on the

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-21 Thread Rowan Tommins [IMSoP]
On 21 May 2025 13:26:27 BST, "Rowan Tommins [IMSoP]" wrote: > >My understanding of the example is that there are two WordPress plugins, which >want independent sets of Composer dependencies. There might be 20 different >Composer packages used by each plugin, but those packages don't need any

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-21 Thread Rowan Tommins [IMSoP]
On 21 May 2025 10:20:19 BST, Michael Morris wrote: >I'll stop you there. You are deliberately misrepresenting what I wrote and >even a cursory glance at it makes that clear. You are not trying to be >constructive in any way, you're trolling. I'm sorry you got that impression. I can assure you

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-21 Thread Michael Morris
On Wed, May 21, 2025 at 7:23 AM Deleu wrote: > > > On Tue, May 20, 2025 at 11:08 AM Michael Morris > wrote: > >> The Problem: Interoperability. >> >> That's really it. >> > > I think this is why Rowan keeps telling you to call or compare this with > "Containers" and not modules. > Which is why

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-21 Thread Deleu
On Tue, May 20, 2025 at 11:08 AM Michael Morris wrote: > The Problem: Interoperability. > > That's really it. > I think this is why Rowan keeps telling you to call or compare this with "Containers" and not modules. When I opened this thread, my interest was in bundling multiple files all at once

Re: [PHP-DEV] Module or Class Visibility, Season 2

2025-05-21 Thread Michael Morris
On Tue, May 20, 2025 at 6:18 PM Rowan Tommins [IMSoP] wrote: > > > On 20 May 2025 15:04:49 BST, Michael Morris wrote: > >The Problem: Interoperability. > > > >That's really it. Scenario > >Alice provides whatchamacallit A that depends on other whatchamacallit D > to > >work. > >Bob provides wha

Re: [PHP-DEV] Re: [RFC] Clone with v2

2025-05-21 Thread Tim Düsterhus
Hi Am 2025-05-19 15:30, schrieb Larry Garfield: For positional parameters, I don't see any way that they'd work or do what someone expects. So why not just block them entirely instead of relying on dynamic properties to warn-but-sorta-work? For better or worse PHP supports numeric properties