Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88596 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81590 invoked from network); 1 Oct 2015 07:11:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2015 07:11:16 -0000 Authentication-Results: pb1.pair.com header.from=pajousek@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pajousek@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.174 as permitted sender) X-PHP-List-Original-Sender: pajousek@gmail.com X-Host-Fingerprint: 209.85.223.174 mail-io0-f174.google.com Received: from [209.85.223.174] ([209.85.223.174:35782] helo=mail-io0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/12-04700-39CDC065 for ; Thu, 01 Oct 2015 03:11:15 -0400 Received: by ioiz6 with SMTP id z6so75060112ioi.2 for ; Thu, 01 Oct 2015 00:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fa0K2CPmXl0GMP3ukLKSjQRiwQggUS9wHZkk8DzM7g4=; b=lC5nUMK81qgmaWvijMyTrqK4LcUKWSyq/7z5f1w4K0CBbFSLHA/3rJNQmCjArb0HQ/ 67Z3gB9AIODDRtdp95HWjHdeWo9VXQDb46m+uleeaPNIwjBFYmYjObVbcL3kL8Zk1ehn nRJimmgLe0dMPA8SXWy8sBSfv5Ir8Y7CB0BD8kASC6c7KYIJtorl8RBlsAGhJHB/bOto mi9nqrWozKZRX5PhS+RjTNPkQDPGiCoiMtmeiRFeKMaOzlfZL0CP9glvyDhi8abMh5+L B5YUjQXEtM9H5WsSjkd21leg/L89lvKBMBnhwfAk2k0f9zs2J9EpncvNuts+Pcg2SOPZ lnGg== MIME-Version: 1.0 X-Received: by 10.107.170.37 with SMTP id t37mr9230530ioe.166.1443683472659; Thu, 01 Oct 2015 00:11:12 -0700 (PDT) Received: by 10.107.189.132 with HTTP; Thu, 1 Oct 2015 00:11:12 -0700 (PDT) In-Reply-To: References: Date: Thu, 1 Oct 2015 09:11:12 +0200 Message-ID: To: Levi Morrison Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Arrow function expressions in PHP From: pajousek@gmail.com (=?UTF-8?Q?Pavel_Kou=C5=99il?=) On Tue, Sep 29, 2015 at 11:55 PM, Levi Morrison wrote: > Reading over the list I don't think people "are torn about" it. There > are some detractors, sure, but there seem to be more detractors about > symbol choice (~) and lack of type declarations. Personally, I feel that without the auto import, the feature would be totally useless. But yes, more people are not happy with the ~ choice. > I disagree that `(int $x) => $x * 2` is vastly better than `fn (int > $x) => $x * 2`. It *might* be better but so much better we should > introduce backtracking into it? In my opinion that is very clear: no. > Especially because this also makes it harder to write other tools for > PHP. The issue I have with the fn() prefix is that it looks "weird" in case you are chaining multiples. And it looks like a function call, but it isn't one. fn($x) => fn($y) => fn($z) How does hack solve this? Do they have backtracking in their parser?