Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98064 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68942 invoked from network); 31 Jan 2017 08:24:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2017 08:24:24 -0000 Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.43 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.215.43 mail-lf0-f43.google.com Received: from [209.85.215.43] ([209.85.215.43:36306] helo=mail-lf0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/30-51557-6B940985 for ; Tue, 31 Jan 2017 03:24:23 -0500 Received: by mail-lf0-f43.google.com with SMTP id z134so207299900lff.3 for ; Tue, 31 Jan 2017 00:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:subject:references:date:mime-version:content-transfer-encoding :from:message-id:in-reply-to:user-agent; bh=EKro18/sF2eUj8yA8V0BMnHipfdfQ8LMNgDipFGLeg8=; b=K6pPqMcENsVkY+z7BlqdUQIbpiT6oyTtKZZV85Lw59aKKHcJsnAAMJ+6EDOYnx4eWD rveW6hMxiEtJ/uTKwFj+RKfCEQy918RxVpNBQfMOMtaVZzzBqxW5fwBPL/yqLqx+0Lw6 owV8NhdmDa2rZftv+5t7wmAQ0rJM8bw4k6ypUf8AElJJRSQ77YWSd8D7EQW98joFzwod JqQbmMCeJHW9tdCq9BrtYGPlqbQupPYAHZEl+GmedFTJoZtu4jxaEAd25jGXnTMon69j WpfG+4KMsiDRQxI5Iu13cejlt13Q/ZhftMuEKCwar7KgfZOSWqKJAvFVMlv+YKLHprpY R6fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=EKro18/sF2eUj8yA8V0BMnHipfdfQ8LMNgDipFGLeg8=; b=t5ZCqEEx/QeJ0BLsf8rCZBcOdRpPFrJFWPS7dZVBP8nHkmEve+esjIhxbSHOsVdxJa A5QXOUGIp5Ud37ypIvoORDYeOTB6QB4vLc/fxMU+8rc+LyQ+gFL6xkUk/yvB/du5Zm6w cd1m3CnbzgNlEvSDAn5QsARqvkYIS3JOVNIiBw3bV0VV614HU49gR290cQ02RT2jbbaW Z3sZw8BjRIkPPgamzZzVFbHE/garl4cJ22a19BygSjmOzy4YgiQDchODEXojc58wSstT MVkaXCQ+WI5g/Epk8NOX3avhuuC/qOA5HnIvyBVM7dST5y4Ir7BA4/gnTwYzVheqI3Fz edqA== X-Gm-Message-State: AIkVDXL1rayxlT8bUtNnhpnOiwm99nJ+8W0HFiQq62RnKOvsagjjPLZn6+kxgyCkhah5BA== X-Received: by 10.25.80.26 with SMTP id e26mr8456025lfb.82.1485851059900; Tue, 31 Jan 2017 00:24:19 -0800 (PST) Received: from nikita-pc (broadband-95-84-178-41.moscow.rt.ru. [95.84.178.41]) by smtp.gmail.com with ESMTPSA id x64sm4374752lfd.15.2017.01.31.00.24.18 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 31 Jan 2017 00:24:19 -0800 (PST) Content-Type: text/plain; charset=koi8-r; format=flowed; delsp=yes To: internals , "Levi Morrison" References: Date: Tue, 31 Jan 2017 11:24:20 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: User-Agent: Opera Mail/12.17 (Win32) Subject: Re: [PHP-DEV] [RFC][Discuss] Arrow Functions From: inefedor@gmail.com ("Nikita Nefedov") On Mon, 30 Jan 2017 20:55:07 +0300, Levi Morrison wrote: > Bob Weinand and I are happy to announce that the [Arrow Functions][1] > RFC is moving into the public discussion phase. We have been > collaborating on this RFC for many months now and finally have a > proposal we are happy to discuss in the open. > > Here is an example of an existing closure: > > function ($x) use ($arr) { > return $arr[$x]; > } > > This RFC proposes syntax and semantics to simplify this common usage to: > > fn($x) => $arr[$x] > > More details are in the RFC. The [implementation][2] currently has no > known issues and is ready for you to download, build and test, which > we encourage you to do. > > We look forward to a productive discussion period and are happy to > answer questions. > > For historical purposes, the revision of this RFC is currently at > [1485798604][3]. > > [1]: https://wiki.php.net/rfc/arrow_functions > [2]: https://github.com/morrisonlevi/php-src/tree/arrow_functions > [3]: https://wiki.php.net/rfc/arrow_functions?rev=1485798604 Hey Levi, Bob, that looks very good. The fn prefix is peculiar yes but it's alright, it doesn't harm neither readability nor writability, it even has some precedences in other languages (think Rust, Elixir) and as we all know it is necessary for parser. Thanks for the work, I hope it lands in PHP.