Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99562 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18101 invoked from network); 19 Jun 2017 20:12:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jun 2017 20:12:22 -0000 Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.28 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.28 out4-smtp.messagingengine.com Received: from [66.111.4.28] ([66.111.4.28:46509] helo=out4-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/3C-13828-52038495 for ; Mon, 19 Jun 2017 16:12:21 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 0397E20BA4 for ; Mon, 19 Jun 2017 16:12:19 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Mon, 19 Jun 2017 16:12:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=r9pQtbIuzU8LW12cgTRExjTsTuSHON8usuabiVHZgC8=; b=sCRAww/v X0JA+C2iRFMaHYph5MusAWrqI9nkHiEubCPdS2WaEBYwT0HXbgeZ582XgZP2G8rt 90Z1Ow2RwVMh1kKAOGsTfepCBqU4t3he0l2dEofVnjK6CD5GsuzR0ac/u7uqSZs5 k4bKNyZNaN94h3mNuZC1M6pqu7ICBTPGmvGK1djhMVrg5fzwRbyJTYUd8HNASYPM W/MdQ/eI7Ep+/vt/L/MzGHEQYQchJoZSJsGSjoE4dtrKab3sBDhgVLgzOFBWYf8y pGPxwUz0CCxC5oFPm6mWaLM+NCdikvB8ylCSvxziMqw8pVu+SLE/NdRY5BMgv0c5 J2sOOfPlFfL7cw== X-ME-Sender: X-Sasl-enc: xBXCHZWi+33Lhb4Sh9k+3jJCJEbHq71zqyvGc957Msdx 1497903138 Received: from [172.4.16.240] (unknown [200.88.48.163]) by mail.messagingengine.com (Postfix) with ESMTPA id A61CF248E7 for ; Mon, 19 Jun 2017 16:12:18 -0400 (EDT) To: internals@lists.php.net References: <5fe1eefe-1c4f-4c31-c975-ab6c768c977c@telia.com> <3C763609-54FC-480B-AE95-94A1873226E0@me.com> <9A3447BF-F982-4C5A-B55B-466036AF2E53@me.com> Message-ID: <2d89daaa-056f-3dcb-a5f2-b790affe203a@garfieldtech.com> Date: Mon, 19 Jun 2017 16:12:17 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [PHP-DEV] [RFC]Discuss] Syntax for Arrow Functions From: larry@garfieldtech.com (Larry Garfield) On 06/19/2017 03:45 PM, Rasmus Schultz wrote: > Or maybe it'll look okay if you format the code? > > $things->forEach({$v => { > foo($v); > bar($v); > }}); > > Still looks kinda crazy with the closing "}})" though... Multi-line lambdas should use the existing syntax without changes. The only thing being discussed here is single-statement lambdas that you would want to inline and think of as an expression rather than a function call. If you need something more complex than that just use the existing syntax. --Larry Garfield