Re: [RFC] [VOTE] Short Closures

From: Date: Wed, 23 Sep 2015 07:10:58 +0000
Subject: Re: [RFC] [VOTE] Short Closures
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-88428@lists.php.net to get a copy of this message
Den 2015-09-22 kl. 03:59, skrev Bob Weinand:
Hey, Thanks for all your feedback in the discussion thread! So, before I start the vote, just two quick notes: I've added two notes about the statement syntax and the single variable use. Though a few people complained, I'm not switching to the ==> operator, as I noticed many people expected typehints to work (they don't due to parser limitations) when they compared to Hack's short Closures. It also allows us to differ syntax-wise [e.g. for typehints] from Hack without causing any confusion later. Which should be the smartest choice: Avoid conflicts. (If anyone strongly feels against that, he may vote no, but I would like to not bikeshed that in this Vote thread, but leave it free for eventual actual issues.) Now, the link to the RFC about Short Closures: https://wiki.php.net/rfc/short_closures or straight ahead to the vote: https://wiki.php.net/rfc/short_closures#vote Thanks, Bob Regarding parenthesis for one parameter I think they should always
be there, because: - More consistent, not necessary to always go the path of others ;) - Simpler for the end-user and readers of code - Also came to mind that while we always use parenthesis when we call a function irrelevant of how many parameters, here we have a case with one parameter, not using parenthesis for defining it... Regards //Björn

« previous php.internals (#88428) next »