Re: Re: [RFC] Arrow functions / short closures

From: Date: Wed, 10 Apr 2019 08:01:34 +0000
Subject: Re: Re: [RFC] Arrow functions / short closures
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-105190@lists.php.net to get a copy of this message
On 10.04.19 00:10, Robert Hickman wrote:
- $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.
I concur, ==> to me also stands out the most easiest to read without too much parenthesis noise. - Markus

« previous php.internals (#105190) next »