Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105197 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20317 invoked from network); 10 Apr 2019 12:30:29 -0000 Received: from unknown (HELO mail-io1-f44.google.com) (209.85.166.44) by pb1.pair.com with SMTP; 10 Apr 2019 12:30:29 -0000 Received: by mail-io1-f44.google.com with SMTP id v4so1506851ioj.5 for ; Wed, 10 Apr 2019 02:27:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LdVAu9nMuJDf5HmketTkPkhPGJwe+hhd3kFRFdOdC2s=; b=pwL3WAvy8bGSivc4dUGLEPy3cN+DwV1MryKekJI3f6Ct7ASJHYZxMwDdw3sUd30vGZ +bRrflEHkR4Dej3zUvZUd6zV5jZC4MclExVpP1nu5/J9Haud7L6NwSxwh4fdqKO9DE7g K7r35hwTZgxYO3XMvBEU9gZjacFKGOvFS3bL5ZEAomzVCwZjKZncyxm9jCw6JWWv4Bdw ttWFt1biF3CAfgYfiAvQ/RGb9+f57LTqiBQ6BKkNHh3RgsjbUnXvMT1VCAAo1Ypw24/U Ov49Skhlv0GArfARYX6IoKCW8wZ7PFU75FM18f6mhT1CoaZ4piKKKVyh6FeUL3onnU8A rrbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LdVAu9nMuJDf5HmketTkPkhPGJwe+hhd3kFRFdOdC2s=; b=hfJ0RBY31iZ9ibbWvap1k9iX4n+Rgt2sn/Y0042Poh9yS2CuEFoQKWuqPWLjCBL+ET s4erj1QgARNQXrUjp2Bl1qLKPVsL0vCNcGetNcfwQ7BRcO6mvAtGr6R2Zet7r+LE8+XB /IT/ITr8/BH0jCNm29FasRQH0d3Be45Mh89jf/DRnVLtpvP+YuNkaVnzXKKyjr0+4NJN CF/GUduM0ml6rmuDBHC5/9XmeAkzeW/TL4C49iqrjtVTzAoWRaeTpQaLcDzJ+hvNRHSL gT29N8zVnRVv3bI/NIyq6vaJEtS/IjhYsEhWBnqNJOMvSgNh+XCY/EwGUtDtB3WC7R96 bxOg== X-Gm-Message-State: APjAAAWySbQdq6m1cvLqSiz39LlgmeQcgoqbHz2Fxsu46o75Qy42PVVZ u6dpXx/9yxunslG6/wmSV9/zyX89CN7NCyfS6KE= X-Google-Smtp-Source: APXvYqxZH1yt7QitKEbY6pZKNdVL7fIhMLbSlLZHYAhQwq7Ds0fJJhrjBTID4fhGJyAqkir8jeK7Y+9O0EKBRQQeWXc= X-Received: by 2002:a6b:3905:: with SMTP id g5mr14551721ioa.39.1554888455407; Wed, 10 Apr 2019 02:27:35 -0700 (PDT) MIME-Version: 1.0 References: <582b57dc-42a0-582b-9471-2ede97ba584a@telia.com> <16a06610618.27c1.08be835b7d1a2c2edb4c4286afe1a236@gmail.com> <6def9c1b-b54d-97bb-de75-beb8fbd83ca8@fischer.name> In-Reply-To: <6def9c1b-b54d-97bb-de75-beb8fbd83ca8@fischer.name> Date: Wed, 10 Apr 2019 11:27:23 +0200 Message-ID: To: Markus Fischer Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000000ccf29058629ae82" Subject: Re: [PHP-DEV] Re: [RFC] Arrow functions / short closures From: benjamin.morel@gmail.com (Benjamin Morel) --0000000000000ccf29058629ae82 Content-Type: text/plain; charset="UTF-8" I think that the RFC covers a great deal of possible syntaxes and their tradeoffs. `==>` requires *a lot* of changes to the current parser, and external tooling as mentioned by Rowan. It has not even been specified whether the `==>` syntax could land into PHP 7.4, or could require postponing to PHP 8.0. I do not think that saving these two little chars `fn` justifies the extra complexity and possible late adoption, if not by PHP, at least by external tooling. Also, extra parser complexity potentially means slower compilation times, even if it's just during opcache warmup. @nikic, the RFC does not mention changes to reflection: - Will arrow functions be accessed through ReflectionFunction as well? - Will they be distinguishable from regular closures, with a method such as `isShortClosure()` or `isArrowFunction()`? Thanks, Ben On Wed, 10 Apr 2019 at 11:08, Markus Fischer wrote: > Hi, Gabriel, > > On 10.04.19 10:33, Gabriel O wrote: > > Those parentheses are important when having multiple argument > > Please don't top post, thanks! > > Thanks for pointing it out, I'm aware. > > Still `===>` would better stand out to _me_ personally. > > thanks, > - Markus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --0000000000000ccf29058629ae82--