Re: [RFC] [Discussion] Short Closures

From: Date: Tue, 01 Sep 2015 09:48:12 +0000
Subject: Re: [RFC] [Discussion] Short Closures
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-87990@lists.php.net to get a copy of this message
On Mon, 31 Aug 2015, Bob Weinand wrote: > I had this RFC in draft since some time, but delayed it due to all the ongoing PHP 7 > discussions. Also we have no master branch to merge features in until 5.4 EOL. Thus I'm > reviving this now. > > Time for the first RFC targeting PHP 7.1 (assuming PHP 8 isn't going to be the next > version ;-)): > > The short Closures RFC: > https://wiki.php.net/rfc/short_closures The RFC writes: > The symbol ~> was chosen as it is a mnemonic device to help > programmers understand that the variable is being brought to a > function. I don't see how this is a mnemonic. I am also struggeling seeing the difference between -> and ~> in certain fonts. > Currently Hack has implemented shorthand anonymous functions using the > ==> symbol to define them. > Additionally, ==> in Hack has slightly different semantics, hence we > decided, it's better to not reuse that symbol What are the difference in semantics? Why not just copy the Hack semantics (and hence, then also use it's symbol)? cheers, Derick

« previous php.internals (#87990) next »