Re: Re: [RFC] Arrow functions / short closures
| From: | Robert Hickman | Date: | Tue, 09 Apr 2019 22:10:50 +0000 |
| Subject: | Re: Re: [RFC] Arrow functions / short closures | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-105186@lists.php.net to get a copy of this message | ||
> - $waithandles = $this->urls->map(fn($url) => $this->fetcher->fetch($url));
> - $waithandles = $this->urls->map(\($url) => $this->fetcher->fetch($url));
> - $waithandles = $this->urls->map($url ==> $this->fetcher->fetch($url));
>
> I would say that when lambda functions occurs in function calls I find the
> \ or ==> syntax more readable.
>
To me, in that context, '==>' is the most readable as it does not have
parentheses on the argument. It's a bit visually noisy with them.