Hi,

If at some point we would have multi-statement body arrow function, I would
assume that one option would be to have the closure done automatically, as
it is done now on the one-line arrow function.
If the values will not be implicitly captured, maybe a new syntax to
capture can be designed there, for multi-line arrow functions.
A way to scan variables is already implemented for the one-line and, I
guess, a way to scan for few lines could also be implemented easier for the
new syntax.

Alex


On Sun, Jun 16, 2019, 00:54 Wes <netmo....@gmail.com> wrote:

> Hello PHP, I just published
>
> https://wiki.php.net/rfc/alternative-closure-use-syntax
>
> I would love your opinion on this
>
> I know it seems overkill and wrong to have two different syntaxes for the
> same thing, but I really believe that's all we need to fix one of the most
> hated PHP syntax bits.
>
> Thank you.
>
> Wes
>

Reply via email to