Re: [RFC][Discuss] Arrow Functions

From: Date: Fri, 03 Feb 2017 23:34:57 +0000
Subject: Re: [RFC][Discuss] Arrow Functions
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-98154@lists.php.net to get a copy of this message
On 03.02.2017 at 18:53, Levi Morrison wrote: > One more thing: I'd like to re-emphasize that the syntax that > JavaScript uses and the one that HHVM/Hack uses are ambiguous in the > current class of our grammar. The following will not work unless we > move to a more powerful grammar and parser class: > > (params) => expr > (params) ==> expr I'm not really familiar with re2c and bison, but I wonder why it's possible to distinguish expr > expr from expr -> expr then. Note that I'm not suggesting to use the Hack syntax here – I'm just curious. -- Christoph M. Becker

« previous php.internals (#98154) next »