On 15/06/2019 22:53, Wes wrote:
Hello PHP, I just published
https://wiki.php.net/rfc/alternative-closure-use-syntax
I would love your opinion on this

I'm not overly fond of it myself because I think it could make it slightly more difficult to parse in my brain.

If there was a:

$x = 0;
$y = 1;

$closure = function() use (...) {

};

Where "use (...)" would auto-capture all of the used variables in a similar manner to short closures, that would certainly save a bit of time.

--
Mark Randall

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to