Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99384 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40726 invoked from network); 5 Jun 2017 20:18:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2017 20:18:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=bjorn.x.larsson@telia.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=bjorn.x.larsson@telia.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain telia.com from 81.236.60.154 cause and error) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.154 v-smtpout1.han.skanova.net Received: from [81.236.60.154] ([81.236.60.154:34849] helo=v-smtpout1.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/78-27119-9ACB5395 for ; Mon, 05 Jun 2017 16:18:51 -0400 Received: from [192.168.7.8] ([195.198.188.252]) by cmsmtp with SMTP id HySddXkR4PPY2HySddcdOh; Mon, 05 Jun 2017 22:18:47 +0200 To: Ryan Pallas , Fleshgrinder References: <6357d97c-3f2e-4cf8-cb1f-cb7f7ccccf7c@telia.com> <7eaef49b-bf60-9aa1-e812-8430164e3178@garfieldtech.com> <3F920987-38CB-42DD-888D-824430C36F14@gmail.com> <2f9e73c9-444a-11d0-459a-e261ea8a7080@telia.com> <4077c099-2247-c3c1-7dee-02a6b25f8586@fleshgrinder.com> Cc: PHP internals Message-ID: <559b73f7-c40f-e593-f0e1-51b56210d7cb@telia.com> Date: Mon, 5 Jun 2017 22:18:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; 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: 8bit Content-Language: sv X-CMAE-Envelope: MS4wfM1RV8M4p5vAGocY55zsIP1SkP/cZfYQPKaKyZf291+UyfJhaTb2VClL9u0zYnz5afkiJ7fiRBl4WGcERW+/E+PpuooBiT0HOBlACXc3uM9ziJRXqDFW blFxm7OZfiGVpNlHZYvst0KpcS8BHp+zGsdYm4z/z2cEN4l6pO+rvQtPXlALXEKchzMD67/VKRj7gYntpJl1dK77jHTOlZgPOoWv/VDSWrBtt4kvCZtZCFvR TiZvjpz/OuyZeDruFcccww== Subject: Re: [PHP-DEV] [RFC]Discuss] Syntax for Arrow Functions From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2017-06-05 kl. 21:23, skrev Ryan Pallas: > On Mon, Jun 5, 2017 at 1:09 PM, Fleshgrinder wrote: > >> On 6/5/2017 9:03 PM, Ryan Pallas wrote: >>> However, ($obj) -> $var is valid variable property syntax. >>> >> Gosh, we really have support for everything. :D That one is even very >> important for stuff like `(new A)->f()`. >> >> How about ~> which I at least cannot think of any place it is used at >> all. ~ in binary negation and the only place we use it (I checked the >> language parser this time to make sure). >> >> I really dislike the ==> idea. One of the main reasons here is to write >> less and it looks too much like => or even >= which I really don't like. >> >> ($a, $b) ==> $a >= $b >> >> ($a, $b) ~> $a >= $b >> >> > I can get behind using the tilde. Keeps it concise, but it's visually > different than existing syntax, making it easier to recognize (IMO). > I think ~>was a proposal in the short closure RFC. Personally I liked it, but could also live with ==>. I recall there was a discussion about how easy it was to use tilde on different keyboards / languages. So at that point the discussion was about either ~> or ==> for syntax. But back to Levi's list it looks like, at least to me that option 2 & 4 are off the table. Leaving option 3 & 1, maybe also option 5. Do you think this is a reasonable assumption? Also some other proposals has arisen, like using lamda instead of fn as a keyword and lastly the ~> one. r//Björn