Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-03 Thread Deleu
Hi Nuno, thank you very much for kicking this off! The current state of short closure is very limited and I believe it was a stepping stone to get to this one. This time there's no drawback of making fn a reserved keyword since it already is. This change will lead to better consistency and it will

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-03 Thread Benjamin Morel
> > If you want to make an RFC about it, it really needs a compelling "pros" > section, because there aren't any, so far :-\ I don't agree. There is one pro, and not a small one IMO if you use closures a lot: skip use(). Since arrow functions have been introduced, I've several times naturally tr

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-03 Thread Marco Pivetta
Hey Nuno, On Sat, Oct 3, 2020 at 11:09 PM Nuno Maduro wrote: > Hey internals, > > > A few days ago I opened a pull request that adds support for multi-line > arrow functions in PHP: https://github.com/php/php-src/pull/6246. > > > As you may already know, PHP 7.4 ha

[PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-03 Thread Nuno Maduro
Hey internals, A few days ago I opened a pull request that adds support for multi-line arrow functions in PHP: https://github.com/php/php-src/pull/6246. As you may already know, PHP 7.4 has introduced one-liner arrow functions (aka short closures). Now, this pull request adds the possibility of