Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98143 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83383 invoked from network); 3 Feb 2017 20:24:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2017 20:24:00 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@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: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.215.43 mail-lf0-f43.google.com Received: from [209.85.215.43] ([209.85.215.43:36830] helo=mail-lf0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F4/46-38491-ED6E4985 for ; Fri, 03 Feb 2017 15:23:58 -0500 Received: by mail-lf0-f43.google.com with SMTP id z134so16016098lff.3 for ; Fri, 03 Feb 2017 12:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=/h/9oU97LEa+MpzWIcON+ldkrj6h7OBHy+lR+ZnSumE=; b=Ws0zHK3YDe0bcLAu8w9J3AA29j0aHZQxhx3cPFB6sUR5IWG0BKOJS0wXxFS1JgexFN f54zFDuqKuHM+DxYT5+KjJgEj9XO/E7PjIlQ85TBcpLEr6cF8kuxlk4822KkBlT5hii5 Fy8wqwmJGsBJV2ZizpfUm0mxEKVMsmLlNBPrMrCjmdGFzjfCLuYY834ATxVaY7TjKCCp e74PytxfOfs5VDuDmotT9yQ/NDOPkrMrAHxCQcJ8RyN8/aUJygGMJeStsBClcxN0ecz1 pWXnmfvmxtEFOm4VNJ8viq2VwIFzqtP9JhPISnQEQ4nWfqaCWH52xgMRr/r+Tz8ELL0G iwkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=/h/9oU97LEa+MpzWIcON+ldkrj6h7OBHy+lR+ZnSumE=; b=HBgXz2UwktM/pJ+Bt1ymByj0qdPmS+/slbyz3UTH2DN9385uaS3fKfXj5yIr043C/D 0ysCNrkFIVcS5ToRBliQz1CDQPp0ZOeyy49Y/MsZM3eTq+IXrIOeu+Qp7cuHFf6v4p+4 K9KTlfbZCtCFW5CEzTRS/QcY33MbTcFUYW+49gln/XLaVFlphUJVsF8Pui3U3b3CkMQ4 y0j9xjTchsjWAkLMy0NhSbvcUTgKspbkbxzTnFCRuBqxZQiLHMBcc9Pc1AnyrDoc1ugZ qqPjUxvf6lQBnEcBpyE7yN2jkPW5KwkNotXjSkNrsRW5rDale/6cbTIcRh97OC03HVdb mR5g== X-Gm-Message-State: AIkVDXLe+YO/nX12OxzSqnKzRDu4VetRIvlC+VAE4cfFR9qqowprbNrp3ghWCgt9hoffz8bLQay0YflLkMXpUg== X-Received: by 10.46.81.18 with SMTP id f18mr1785601ljb.62.1486153435332; Fri, 03 Feb 2017 12:23:55 -0800 (PST) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.25.151.139 with HTTP; Fri, 3 Feb 2017 12:23:54 -0800 (PST) In-Reply-To: <19.45.38491.677D4985@pb1.pair.com> References: <19.45.38491.677D4985@pb1.pair.com> Date: Fri, 3 Feb 2017 13:23:54 -0700 X-Google-Sender-Auth: -Wk-bQxG-kAeDdYcvbJTFZboDcM Message-ID: To: Andrea Faulds Cc: internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions From: levim@php.net (Levi Morrison) On Fri, Feb 3, 2017 at 12:18 PM, Andrea Faulds wrote: > Hi David, > > David Rodrigues wrote: >> >> Hello folks! >> I just not understand why "function" should be abbreviated. It's about >> "how >> less character better"? I don't see it too much on PHP. I guess that is >> more simple keep what exists current "function", that all knows about >> (that >> should be better than the next example): >> >> $mapped =3D array_map(function($x) =3D> $x + $y); // vs current: >> $mapped =3D array_map(function($x) use($y) { return $x + $y }); > > > I feel the same way. It would be nice to have shorter syntax, but it > sacrifices readability and familiarity here, and adds yet another new > keyword. > > It also feels inconsistent=E2=80=A6 isn't "fn" just short for "function"?= Why is it > exclusive to the =3D> syntax? This is not exactly on topic... unless you are implying you'd prefer the `|$x| =3D> $x + $y`? Maybe you missed [this][1] message? [1]: http://news.php.net/php.internals/98136