Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98076 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94333 invoked from network); 31 Jan 2017 12:37:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2017 12:37:26 -0000 Authentication-Results: pb1.pair.com header.from=michal@brzuchalski.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=michal@brzuchalski.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain brzuchalski.com designates 188.165.245.118 as permitted sender) X-PHP-List-Original-Sender: michal@brzuchalski.com X-Host-Fingerprint: 188.165.245.118 ns220893.ip-188-165-245.eu Received: from [188.165.245.118] ([188.165.245.118:35743] helo=poczta.brzuchalski.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/A4-51557-EF480985 for ; Tue, 31 Jan 2017 07:37:19 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by poczta.brzuchalski.com (Postfix) with ESMTP id 167FC2984239 for ; Tue, 31 Jan 2017 13:37:15 +0100 (CET) Received: from poczta.brzuchalski.com ([127.0.0.1]) by localhost (poczta.brzuchalski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CCM46Ppg5vS4 for ; Tue, 31 Jan 2017 13:37:10 +0100 (CET) Received: from mail-vk0-f54.google.com (unknown [209.85.213.54]) by poczta.brzuchalski.com (Postfix) with ESMTPSA id 5B80E2984238 for ; Tue, 31 Jan 2017 13:37:10 +0100 (CET) Received: by mail-vk0-f54.google.com with SMTP id t8so235952294vke.3 for ; Tue, 31 Jan 2017 04:37:10 -0800 (PST) X-Gm-Message-State: AIkVDXJx0NQAE4c0unX/PR7PHEawfKQJ9gzfiHPm1aDV/1/D3gxOqZi6CcJ6nbLumsZiXLR/FI63EzVutCPstg== X-Received: by 10.31.66.139 with SMTP id p133mr13067938vka.20.1485866229452; Tue, 31 Jan 2017 04:37:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.35.204 with HTTP; Tue, 31 Jan 2017 04:37:08 -0800 (PST) In-Reply-To: <20170131122056.GA14569@phcomp.co.uk> References: <20170131122056.GA14569@phcomp.co.uk> Date: Tue, 31 Jan 2017 13:37:08 +0100 X-Gmail-Original-Message-ID: Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary=001a11446e28ca7de4054763301f Subject: Re: [PHP-DEV] [RFC][Discuss] Arrow Functions From: michal@brzuchalski.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --001a11446e28ca7de4054763301f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2017-01-31 13:20 GMT+01:00 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) =3D> foo($x, $y); > > > > array_map(($x) =3D> $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 > > IMO it'll be hard to detect arrow function then. Consider an example: $y =3D 'a'; $x =3D 1; $a =3D [ $y =3D> 'b', ($x) =3D> $x + 1, ]; > -- > Alain Williams > Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, I= T > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 regards / pozdrawiam, -- Micha=C5=82 Brzuchalski about.me/brzuchal brzuchalski.com --001a11446e28ca7de4054763301f--