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

2025-05-19 Thread Andreas Hennings
On Mon, 19 May 2025 at 17:13, Nicolas Grekas wrote: > > > > Le lun. 19 mai 2025 à 16:30, Andreas Hennings a écrit : >> >> On Fri, 16 May 2025 at 21:59, Nicolas Grekas >> wrote: >> > >> > >> > >> > Le jeu. 15 mai 2025 à 16:06, Larry Garfield a >> > écrit : >> >> >> >> On Thu, May 15, 2025, at 1

Re: [PHP-DEV] Forced named parameters

2025-05-19 Thread Yogarine
> Since PHP named args work similarly, borrowing syntax makes sense. It would > look like > > function f(Type $pos1, Type $pos2, ...$v, Type $named1, Type $named2) > > or without the variadic > > function f(Type $pos1, Type $pos2, ..., Type $named1, Type $named2) Hi Anton, I really like th

[PHP-DEV] Forced named parameters

2025-05-19 Thread Anton Smirnov
Hi everyone, Looking [RFC] Clone with v2, especially Larry's message (https://externals.io/message/127353#127399) I'm thinking that it might be a good idea to allow forcing function calls to use named arguments. Python has it by defining arguments after the variadic argument: https://peps.pyth

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

2025-05-19 Thread Nicolas Grekas
Le lun. 19 mai 2025 à 16:30, Andreas Hennings a écrit : > On Fri, 16 May 2025 at 21:59, Nicolas Grekas > wrote: > > > > > > > > Le jeu. 15 mai 2025 à 16:06, Larry Garfield a > écrit : > >> > >> On Thu, May 15, 2025, at 1:22 AM, Stephen Reay wrote: > >> > >> > I may be missing something here.. >

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

2025-05-19 Thread Andreas Hennings
On Fri, 16 May 2025 at 21:59, Nicolas Grekas wrote: > > > > Le jeu. 15 mai 2025 à 16:06, Larry Garfield a écrit : >> >> On Thu, May 15, 2025, at 1:22 AM, Stephen Reay wrote: >> >> > I may be missing something here.. >> > >> > So far the issues are "how do we deal with a parameter for the actual >

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

2025-05-19 Thread Larry Garfield
On Mon, May 19, 2025, at 5:48 AM, Volker Dusch wrote: > Hey everyone, > > Thank you for the participation so far, since the start of the > discussion, from feedback on and off list, I've added a couple of > examples: > > - > https://wiki.php.net/rfc/clone_with_v2#:~:text=dynamic%20property%20cre

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

2025-05-19 Thread Volker Dusch
On Fri, May 16, 2025 at 8:46 PM Rowan Tommins [IMSoP] wrote: > However, readonly properties are "protected(set)" by default, so the > situations where this can happen are actually quite limited: > > - Code inside the class itself (private scope) can reasonably be > considered to be "opting in" t

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

2025-05-19 Thread Volker Dusch
Hey everyone, Thank you for the participation so far, since the start of the discussion, from feedback on and off list, I've added a couple of examples: - https://wiki.php.net/rfc/clone_with_v2#:~:text=dynamic%20property%20creation%20follows%20established%20PHP%20rules - https://wiki.php.net/rfc/