Re: [PHP-DEV] First-class constructor callables

2025-11-21 Thread Arnaud Le Blanc
Hi Gina, On Fri, Nov 21, 2025 at 4:47 AM Gina P. Banyard wrote: > Oh so one more reason to get rid of the get_constructor() handler then. > Would the approach that I started prototyping in > https://github.com/php/php-src/pull/19797 help as we would know the > zend_function the moment we have the

Re: [PHP-DEV] First-class constructor callables

2025-11-20 Thread Gina P. Banyard
On Thursday, 20 November 2025 at 16:40, Arnaud Le Blanc wrote: > On Thu, Nov 20, 2025 at 3:21 PM Arnaud Le Blanc [email protected] wrote: > > > Hi Valentin, > > > > On Thu, Nov 20, 2025 at 2:20 PM Valentin Udaltsov > > [email protected] wrote: > > > > > Question for Larry and Arna

Re: [PHP-DEV] First-class constructor callables

2025-11-20 Thread Arnaud Le Blanc
On Thu, Nov 20, 2025 at 3:21 PM Arnaud Le Blanc wrote: > > Hi Valentin, > > On Thu, Nov 20, 2025 at 2:20 PM Valentin Udaltsov > wrote: > > Question for Larry and Arnaud: > > > > In PFA v2, you note that constructor references pose significant technical > > challenges. > > Could you elaborate on

Re: [PHP-DEV] First-class constructor callables

2025-11-20 Thread Larry Garfield
On Thu, Nov 20, 2025, at 8:21 AM, Arnaud Le Blanc wrote: > Hi Valentin, > > On Thu, Nov 20, 2025 at 2:20 PM Valentin Udaltsov > wrote: >> Question for Larry and Arnaud: >> >> In PFA v2, you note that constructor references pose significant technical >> challenges. >> Could you elaborate on what t

Re: [PHP-DEV] First-class constructor callables

2025-11-20 Thread Arnaud Le Blanc
Hi Valentin, On Thu, Nov 20, 2025 at 2:20 PM Valentin Udaltsov wrote: > Question for Larry and Arnaud: > > In PFA v2, you note that constructor references pose significant technical > challenges. > Could you elaborate on what those challenges are and whether they are > fundamental, or potential

[PHP-DEV] First-class constructor callables

2025-11-20 Thread Valentin Udaltsov
Hello internals, I'd like to explore the possibility of adding a first-class callable syntax for object constructors: ``` $factory = new Foo(...); ``` The idea is that this expression would produce a Closure which, when invoked, calls the constructor with the provided arguments: ``` $factory =