Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105190 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93647 invoked from network); 10 Apr 2019 11:05:31 -0000 Received: from unknown (HELO vie01a-dmta-pe06-1.mx.upcmail.net) (84.116.36.14) by pb1.pair.com with SMTP; 10 Apr 2019 11:05:31 -0000 Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.91) (envelope-from ) id 1hE8Bo-0003xA-21 for internals@lists.php.net; Wed, 10 Apr 2019 10:02:36 +0200 Received: from mail02.home ([213.47.8.56]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id E8Aphwd0y5D5NE8AphaeJx; Wed, 10 Apr 2019 10:01:36 +0200 X-Env-Mailfrom: markus@fischer.name X-Env-Rcptto: internals@lists.php.net X-SourceIP: 213.47.8.56 X-CNFS-Analysis: v=2.3 cv=bu8y+3Si c=1 sm=1 tr=0 a=UsP8JIz990cEySE/ILGzbQ==:117 a=UsP8JIz990cEySE/ILGzbQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=oexKYjalfGEA:10 a=2EALvoLjsrEA:10 a=ZZnuYtJkoWoA:10 a=WE0tBfniaqA9sHyGcPwA:9 a=QEXdDO2ut3YA:10 Received: from mail02.home ([192.168.1.14] helo=the-matrix-has-you.local) by mail02.home with esmtp (Exim 4.72) (envelope-from ) id 1hE8Ao-0002x8-N6 for internals@lists.php.net; Wed, 10 Apr 2019 10:01:35 +0200 To: internals@lists.php.net References: <582b57dc-42a0-582b-9471-2ede97ba584a@telia.com> Message-ID: Date: Wed, 10 Apr 2019 10:01:34 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam_report: Spam detection software, running on the system "scanner01.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-CMAE-Envelope: MS4wfMljENd7A+QFqXv4JT7a5ZN+lWNL8t/lX4YeWrxf/oWPuekusVg6XreHzd7wuMM69NgnRXavj+3i+FxPH6TMAlceIVeTtmpdLlpKtSRluUNEuiyyseF8 YoI6EhNjkf8+QDO5uBNW8U1uiWlUW0080W05ZHPs4HX/uEpLlv+0rO4s Subject: Re: [PHP-DEV] Re: [RFC] Arrow functions / short closures From: markus@fischer.name (Markus Fischer) 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