Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104694 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 71110 invoked from network); 13 Mar 2019 22:45:56 -0000 Received: from unknown (HELO out2-smtp.messagingengine.com) (66.111.4.26) by pb1.pair.com with SMTP; 13 Mar 2019 22:45:56 -0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id BCD6721111; Wed, 13 Mar 2019 15:36:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 13 Mar 2019 15:36:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; h=from:message-id:content-type:mime-version:subject:date :in-reply-to:cc:to:references; s=fm1; bh=ANhne8+FC2uSzAFrL6yWOM0 FyaBsxN6azXdfRtekPdY=; b=uOywnNcoDwBhZNGyDepV+FkOy+nYF7VDwVrltst AOJIUM3W6xbYpxlPjOMHZACelg1DjiMcdys0i+oSaj7Z59K0Kw11LpcyuhYUAFFY L4OcHCl2zoDwUoCNxyfuUzhZF5x2SgaaxDvmbxoLmvjLDo4regHn9hhgebSX9Ono jCiUqKJHdAPjEDxifTyu5EaPAJzf7Ot/zx8mxijGryZIHBhH/bWHMiKEe1MsHxGK cYasqjUgP94MhcKAh5BwJxG63aJ0+aQxz/+BXekPncZruGzqmitCC8oY8bhQjE0l ZxdxBoBNogj1Yg6kKYB+tEjyWPBRj+QKWr3Qzyk3YMxdmiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ANhne8 +FC2uSzAFrL6yWOM0FyaBsxN6azXdfRtekPdY=; b=NJCywCKOGwgFnJ7aYvPmkH x2kdqknX7v/u/+lBUvYdX475nNXERkXD/4c+dYpsVJFTgR2sj8TUihWNEiMX/9sH RMO2Wak4WpB3OmnaqBMhzjQBP3mTOlPnOARIvXpvezDYGrHWW8T7PyC1BmrAndtS xdQWZ9zB+lBYc4xbPNN1osOYL7dEposUJ/H1Q7h8vZ5fNP/YN1hRvTuAcUcrnKEo gqf5EyFLw+/NC8UCysqwr2Z2xKQPP6eKWtU6n7l8+94RvPy99x4+NaHwaK/Gn9yo kQ7rrB6R9q6WgzOM4lhwi+82/Ekw9XLQmNtIYwZGIO1b8g8j+6Ofq+IGR1wnNUlw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrhedtgdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffktgggufffjgfvfhfosehgtdhmrehhtddvnecuhfhrohhmpeeuvghnucft rghmshgvhicuoegsvghnsegsvghnrhgrmhhsvgihrdgtohhmqeenucffohhmrghinhepph hhphdrnhgvthenucfkphepleeirdeiuddrudejtddrhedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpegsvghnsegsvghnrhgrmhhsvgihrdgtohhmnecuvehluhhsthgvrhfuihiivg eptd X-ME-Proxy: Received: from [10.10.42.56] (h96-61-170-50.lvrgtn.dsl.dynamic.tds.net [96.61.170.50]) by mail.messagingengine.com (Postfix) with ESMTPA id 1A7E110335; Wed, 13 Mar 2019 15:36:08 -0400 (EDT) Message-ID: Content-Type: multipart/signed; boundary="Apple-Mail=_9BB9138C-409F-4867-9AA5-6A0733201E8A"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Date: Wed, 13 Mar 2019 14:36:07 -0500 In-Reply-To: Cc: PHP internals To: Nikita Popov References: X-Mailer: Apple Mail (2.3445.102.3) Subject: Re: [PHP-DEV] [RFC] Arrow functions / short closures From: ben@benramsey.com (Ben Ramsey) --Apple-Mail=_9BB9138C-409F-4867-9AA5-6A0733201E8A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 13, 2019, at 10:56, Nikita Popov wrote: >=20 > Hi internals, >=20 > Motivated by the recent list comprehensions RFC, I think it's time we = took > another look at short closures: >=20 > https://wiki.php.net/rfc/arrow_functions_v2 >=20 > This is based on a previous (withdrawn) proposal by Levi & Bob. It = uses the > syntax >=20 > fn($x) =3D> $x * $multiplier >=20 > and implicit by-value variable binding. This example is roughly = equivalent > to: >=20 > function($x) use($multiplier) { return $x * $multiplier; } >=20 > The RFC contains a detailed discussion of syntax choices and binding = modes. Has the use of `f` as a leading symbol been considered and discussed? = For example: f($x) =3D> $x * $multiplier Cheers, Ben --Apple-Mail=_9BB9138C-409F-4867-9AA5-6A0733201E8A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQToXQMR3fpbrPOmEOewLZeYnIwHGwUCXIlbpwAKCRCwLZeYnIwH G+ntAPoCq6AD61xV0RTUfT38naAasVt1FYOQcZr1V5+rbasKHgD/bfffmiuZxNlj 6xXVmYT+2Q6ZY0FIS7EfVnoeQkacjFQ= =7uLE -----END PGP SIGNATURE----- --Apple-Mail=_9BB9138C-409F-4867-9AA5-6A0733201E8A--