Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88148 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80903 invoked from network); 10 Sep 2015 20:22:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2015 20:22:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.102 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.102 blu004-omc2s27.hotmail.com Received: from [65.55.111.102] ([65.55.111.102:56860] helo=BLU004-OMC2S27.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 16/B0-08984-576E1F55 for ; Thu, 10 Sep 2015 16:22:14 -0400 Received: from BLU437-SMTP23 ([65.55.111.72]) by BLU004-OMC2S27.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Thu, 10 Sep 2015 13:22:12 -0700 X-TMN: [Qhd5wSx1sgkv99d/FPSM0nlsKdTe+zX6] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) In-Reply-To: <55F1E269.60403@telia.com> Date: Thu, 10 Sep 2015 22:22:06 +0200 CC: PHP internals Content-Transfer-Encoding: quoted-printable References: <55E77CA9.7050609@gmail.com> <55F1E269.60403@telia.com> To: =?utf-8?Q?Bj=C3=B6rn_Larsson?= X-Mailer: Apple Mail (2.2098) X-OriginalArrivalTime: 10 Sep 2015 20:22:08.0962 (UTC) FILETIME=[5E4A2220:01D0EC06] Subject: Re: [PHP-DEV] [RFC] [Discussion] Short Closures From: bobwei9@hotmail.com (Bob Weinand) > Am 10.09.2015 um 22:04 schrieb Bj=C3=B6rn Larsson = : >=20 > Den 2015-09-03 kl. 00:48, skrev Rowan Collins: >> Amendment 3. Make the parentheses around the argument list mandatory = so that (if Amendment 1 is also adopted) there is only a single variant = of the syntax, namely "( param list ) ~> expression". >>=20 > Any plans to incorporate any of the amendments above in the RFC? > Personally I favour amendment 3. One of your examples would be: > functionreduce(callable $fn){ > return($initial)~>($input)~>{ > $accumulator=3D$initial; > foreach($inputas$value){ > $accumulator=3D$fn($accumulator,$value); > } > return$accumulator;}; > } >=20 > Or maybe I'm just overly familiar having function arguments > within parenthesis ;) >=20 > Regards, //Bj=C3=B6rn Larsson You are probably just very familiar with them ;-) It totally isn't unusual to have that (for languages allowing untyped = params), see: Javascript (ES6) Hack C# (There probably are more, I just can recall these three off my head) So, I think this very much falls under personal preference. Bob=