I ended up voting NO due to the fact that there is no mention of `$this`
behavior changes ( https://externals.io/message/117888#117889 ) : I also
disagree with NikiC's stance on this being the same construct as before (
https://externals.io/message/117888#117897 ), so I really wanted to get rid
of this constant memleak risk that we have in closures. I should have made
my stance stronger, instead of letting the discussion thread die, but time
is what it is.

The idea is interesting, but I'd rather keep using the old construct until
the new one doesn't have the same pitfalls, and I'm fine with having to
type more characters for the time being.

The optimizations applied to the new proposal can probably be experimented
on short closures meanwhile (for PHP 9.0, since there will certainly be the
"edge of edgecases" somewhere), since there is hope for perf improvements
there too.

Unclear (to me) after looking at
https://gist.github.com/arnaud-lb/d9adfbf786ce9e37c7157b0f9c8d8e13, is
whether the optimizations are applied at compile time. It looks like the
changes are inside the `Zend/Optimizer/`, and `zend_compile.c`, so perhaps
the benchmarks are probably just worded in a confusing way.

Important to note how `Zend/zend_compile.c` now depends on `Optimizer/`,
which is a potential design issue.

Greets,

Marco Pivetta

https://twitter.com/Ocramius

https://ocramius.github.io/


On Fri, 1 Jul 2022 at 16:05, Larry Garfield <la...@garfieldtech.com> wrote:

> Greetings, Internalians.
>
> The vote for auto-capture closures is now open.  It will run until 15 July.
>
> https://wiki.php.net/rfc/auto-capture-closure
>
> --
>   Larry Garfield
>   la...@garfieldtech.com
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>

Reply via email to