Re: [PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-08 Thread Stephen Reay
> On 4 Jun 2023, at 02:11, Dan Ackroyd wrote: > > Hi internals, > > I'm now opening the discussion for the Closure self-reference RFC: > https://wiki.php.net/rfc/closure_self_reference > > This was previously discussed as a draft here: > https://externals.io/message/112216#112216 > >

Re: [PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-06 Thread Erick de Azevedo Lima
Hello you all. As closures are objects, I'd be ok with $this->__invoke(), but it's not possible because closures can be bound to other contexts. >From the proposed solutions, the one that makes more sense to me is the __CLOSURE__, because not only it does not need the boilerplate that can be

Re: [PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-06 Thread Bruce Weirdan
On Sat, Jun 3, 2023 at 9:11 PM Dan Ackroyd wrote: > I'm now opening the discussion for the Closure self-reference RFC: > https://wiki.php.net/rfc/closure_self_reference Looking at the syntax options on the RFC page, the following explanation is not clear to me: > * De-anonymize the function.

Re: [PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-06 Thread Timo Tijhof
On Mon, 5 Jun 2023 at 05:09, Alexandru Pătrănescu wrote: > > How about a keyword/variable to the current executing closure that works > also if you refactor it to a function or a method. > Just like self for a class we can have a keyword like fnself [..] This seems quite appealing to me, and

Re: [PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-04 Thread Alexandru Pătrănescu
On Sat, Jun 3, 2023, 21:11 Dan Ackroyd wrote: > Hi internals, > > I'm now opening the discussion for the Closure self-reference RFC: > https://wiki.php.net/rfc/closure_self_reference > > This was previously discussed as a draft here: > https://externals.io/message/112216#112216 > > Thank-you to

Re: [PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-04 Thread Juliette Reinders Folmer
On 3-6-2023 21:11, Dan Ackroyd wrote: Hi internals, I'm now opening the discussion for the Closure self-reference RFC: https://wiki.php.net/rfc/closure_self_reference This was previously discussed as a draft here: https://externals.io/message/112216#112216 Thank-you to KapitanOczywisty for

[PHP-DEV] RFC [Discussion]: Closure self-reference

2023-06-03 Thread Dan Ackroyd
Hi internals, I'm now opening the discussion for the Closure self-reference RFC: https://wiki.php.net/rfc/closure_self_reference This was previously discussed as a draft here: https://externals.io/message/112216#112216 Thank-you to KapitanOczywisty for the implementation. cheers Dan Ack --