Re: [PHP-DEV] Forced named parameters

2025-05-23 Thread Alwin Garside
Hi Anton, > On 23 May 2025, at 03:24, Anton Smirnov wrote: > >> Moreover, what if I don't need a variadic parameter, but would like to >> declare that the function's interface requires named arguments (because I >> don't want to be tied to locking parameters to specific positions). > > If you

Re: [PHP-DEV] RFC: Single-Expression functions

2025-05-23 Thread Larry Garfield
On Thu, May 22, 2025, at 8:53 PM, Anton Smirnov wrote: > Hi Dmitriy > > On 22/05/2025 12:24, Dmitry Derepko wrote: > > I'm aware that Larry Garfield previously proposed a similar feature > > several years ago, though it unfortunately didn't pass the voting stage. > > I would like to respectfully

Re: [PHP-DEV] Forced named parameters

2025-05-23 Thread Morgan
On 2025-05-23 13:24, Anton Smirnov wrote: Hi Alwin Please explain the syntax you propose about this part: > That way, you could even make it so that only specific arguments are required to be named because I see only 2 ways to call it:   #[AllArgsAreNamed] function f (/* ... */) and