Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88604 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3163 invoked from network); 1 Oct 2015 12:34:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2015 12:34:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=bjorn.x.larsson@telia.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=bjorn.x.larsson@telia.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain telia.com from 81.236.60.155 cause and error) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.155 v-smtpout2.han.skanova.net Received: from [81.236.60.155] ([81.236.60.155:45738] helo=v-smtpout2.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/25-04700-9382D065 for ; Thu, 01 Oct 2015 08:34:02 -0400 Received: from [192.168.7.4] ([195.198.188.252]) by cmsmtp with SMTP id hd3eZiujOb8Rrhd3eZ3HFD; Thu, 01 Oct 2015 14:33:58 +0200 To: =?UTF-8?Q?Pavel_Kou=c5=99il?= References: <560CDFEF.2010008@telia.com> Cc: PHP internals Message-ID: <560D2839.9000501@telia.com> Date: Thu, 1 Oct 2015 14:34:01 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfEVgBsJcXjwvM8aQPFCLD4Ehm4ieSuyCde2imROXWNxq2i4FyxY+fYWRa6MMlMoae2DSdJYedOrvOMU7gBi+hcqcXyMB3UiSDRwUOCxd7nZhVdxGMEaKmsBSlrAPr/VkGBAZ/2ADYmSuw/m2zPqZVTPNxlHaBuBBuVd1aQwstzbssZP2pZBRV3LnJ829n98p/HVNWxDercQdJbXHSlqcME8maLKGHv2XZQ40Oe7Jtqps Subject: Re: Fwd: [PHP-DEV] Arrow function expressions in PHP From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2015-10-01 kl. 11:47, skrev Pavel Kouřil: >> How does hack solve this? Do they have backtracking in their parser? >> >> It was discussed earlier & Bob answered it, a T_LAMDA_OP is inserted >> by a token token-pre-parser before hitting the real parser, see: >> >> Subject: Re: [PHP-DEV] [RFC] [Discussion] Short Closures >> Date: Sun, 6 Sep 2015 17:59:57 -0700 >> From: Sara Golemon >> To: Bob Weinand >> Copy: Björn Larsson , PHP Internals >> >> >> Regards //Björn Larsson >> > (Resending, because I accidentally forgot to "Reply All".) > > So, if I'm understanding this correctly - this approach wouldn't > require backtracking, and would make the simplest syntax possible? > > Regards > PK > Well, I don't know really being a userland developer, but I'm sure Sara & Bob knows. It's discussed in the "[RFC] [Discussion] Short Closures" thread and I recall it was described as an ugly hack (abomination). Still Hack has the functionality with type-hinting, default values and simple syntax. Regards, //Björn