Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99598 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9494 invoked from network); 21 Jun 2017 20:24:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jun 2017 20:24:35 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.192.180 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.192.180 mail-pf0-f180.google.com Received: from [209.85.192.180] ([209.85.192.180:36438] helo=mail-pf0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/BF-13828-106DA495 for ; Wed, 21 Jun 2017 16:24:34 -0400 Received: by mail-pf0-f180.google.com with SMTP id q86so5996248pfl.3 for ; Wed, 21 Jun 2017 13:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=fp6qPPnx5k+hZFChDVb7620rDPfh17S6/8zHBzZgL+0=; b=ZA8lm0oWGSt2tNxiW93FSK+OdMg508WuOa4H7kylwDmUwLz2PRHs5YnAlLW6xdAmqw Ajb3zU8TBprszdARHMEgOIDNdEvnFCIyW7G/Lhtd/jq7N3pKL3zZTpHwaHbFglYcyzSs 9dDlq4AX57Z3dOJqT7gao2WaBOsIykMXYNw1bg5U9pAFBsZjSRfHhbvvY5K3O5YOlXmT ZCtVUWVX3Br/Jcs/BpgUy0YceDXuZmf1YZblC8IhXCitL49IGCUU1XIKeKOKPbDN7uCO 8UGqNS72KEOd3x1WqK48jtHUEao/OX9hYqWQX5Lx7IIX5nOGnzCVMeqTgR4zkBKSfJDo wKiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fp6qPPnx5k+hZFChDVb7620rDPfh17S6/8zHBzZgL+0=; b=ukstC8fwK6Z8zqA6fEU5u5qT/9Uz0TiqNuKiW6CY1TeFWWB27mi7lE/zO7PG1Uh7mH WDtPd9kpjLvzBY/FNWc7tWXYIDV9wrcIVsAvGaGbCeh5fEMwltTKolFO2kDziSRGruPU bwCj1VxUG2XYoVvqrzHTtH43lG9HyCst+r9CVM1p3dteVTbKMAXP+L0eugCJTk/1CCgc aycTPZpU066/UdgheK8mIkVmHIvf0+Ulweal5h7TZAiciVX2H7jUUbTK2fzzgxLwsZMd yGE6xo9G9Uz97nrcds/1M49gb0jFumM0q7D59eBHWABWADWLU715OeaKWunpHJBDO9vK jMbQ== X-Gm-Message-State: AKS2vOx0LILgW+q64akVEG3YUg1U3Fl86/k4LanV8rtR/C79LXEJWxuD udVJdNwfJee5CaTjk6TtM+1iH9CGKw/l X-Received: by 10.84.218.2 with SMTP id q2mr34315554pli.208.1498076670825; Wed, 21 Jun 2017 13:24:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.151.167 with HTTP; Wed, 21 Jun 2017 13:24:30 -0700 (PDT) In-Reply-To: <60544EC3-1A13-4E17-B0FB-39C79BB69AE2@bobs-bits.com> References: <5fe1eefe-1c4f-4c31-c975-ab6c768c977c@telia.com> <3C763609-54FC-480B-AE95-94A1873226E0@me.com> <9A3447BF-F982-4C5A-B55B-466036AF2E53@me.com> <2d89daaa-056f-3dcb-a5f2-b790affe203a@garfieldtech.com> <60544EC3-1A13-4E17-B0FB-39C79BB69AE2@bobs-bits.com> Date: Wed, 21 Jun 2017 22:24:30 +0200 Message-ID: To: Stephen Reay Cc: Rowan Collins , PHP internals Content-Type: multipart/alternative; boundary="94eb2c1a336ecfaf3805527e27dd" Subject: Re: [PHP-DEV] [RFC]Discuss] Syntax for Arrow Functions From: rasmus@mindplay.dk (Rasmus Schultz) --94eb2c1a336ecfaf3805527e27dd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Once you start getting into multi statement closures, all the weird syntax elements that are being proposed just make it harder to read and harder to visually parse. The same is true for current function syntax. But that's what line-breaks are for :-) > Automatically importing variables isn=E2=80=99t =E2=80=9Cmore natural=E2= =80=9D, unless you think JavaScript is god=E2=80=99s gift to programmers. Meh, but it's what web developers are used to. The two biggest web languages, PHP and JS, you know? Most other languages don't require you to explicitly import vars into closures either. On Wed, Jun 21, 2017 at 5:19 PM, Stephen Reay wrote= : > > > On 21 Jun 2017, at 21:04, Rasmus Schultz wrote: > > > > Once people see the nicer, shorter syntax, > > For anything but the most basic of closures, the shorter syntax just make= s > it harder to visually identify the logic. For 1 liners like `fn($x) =3D> = $x * > 2` I can agree there is an argument that its easier to read. I don=E2=80= =99t > necessarily agree but I can agree there is an argument to be made. > > Once you start getting into multi statement closures, all the weird synta= x > elements that are being proposed just make it harder to read and harder t= o > visually parse. > > > > and start to enjoy the more > > natural scoping rules, > > Automatically importing variables isn=E2=80=99t =E2=80=9Cmore natural=E2= =80=9D, unless you think > JavaScript is god=E2=80=99s gift to programmers. > > --94eb2c1a336ecfaf3805527e27dd--