On Wed, Mar 24, 2021 at 5:40 PM Larry Garfield <[email protected]>
wrote:

> In response to the feedback that the savings in typing volume is small,
> that's true but also not the main point.  The main point is to allow and
> encourage functions to be written an in "expression style", that is, as
> actual functions and not procedures.  As the RFC notes, such use cases are
> increasing, and is likely to increase in PHP, and that's overall a good
> thing for the language.  It fits well with a number of recent RFCs both
> passed and proposed, and makes writing functional-style code much more
> natural.
>

Hi Larry,

I too am wondering about the space saving aspect; as Levi showed it's quite
easy to currently write functions on one line, which really only cost 7
more characters.  Overall though, I am not a fan of the code getting wider,
and the return statements not lining up as I scroll down the code.

As for the "expression style" argument, it's a valid one.  However, I'm
confused why you submitted this RFC hand-in-hand with the multi-statement
auto-capture closures.  Doesn't that contradict the single statement
"expression style" argument?

Overall, I'm not really that much against it, but my only worry is that
while it is slightly less verbose it might create more cluttered code.

Thanks,
Peter

P.S. I also don't like PSR-12.  Allman braces and tabs for life.

Reply via email to