Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98074 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91223 invoked from network); 31 Jan 2017 12:21:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2017 12:21:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Received: from [78.32.209.33] ([78.32.209.33:52944] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/F3-51557-B2180985 for ; Tue, 31 Jan 2017 07:21:00 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.84_2) (envelope-from ) id 1cYXQe-0004HV-IK for internals@lists.php.net; Tue, 31 Jan 2017 12:20:56 +0000 Date: Tue, 31 Jan 2017 12:20:56 +0000 To: internals@lists.php.net Message-ID: <20170131122056.GA14569@phcomp.co.uk> Mail-Followup-To: internals@lists.php.net References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Organization: Parliament Hill Computers Ltd User-Agent: Mutt/1.5.20 (2009-12-10) Subject: Re: [PHP-DEV] [RFC][Discuss] Arrow Functions From: addw@phcomp.co.uk (Alain Williams) On Tue, Jan 31, 2017 at 01:06:25PM +0100, Nicolas Grekas wrote: > Or just drop any "fn" or "function" keyword, eg > > ($x, $y) => foo($x, $y); > > array_map(($x) => $x + 1); That has the great advantage of being much as Javascript does this. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include