On 30 May 2017 09:30:02 BST, "Björn Larsson" <bjorn.x.lars...@telia.com> wrote:
>I presume then that the options discussed earlier "|params| => expr"
>and "lamda(params) => expr" are of the table.

I'm a fan of "lambda(params) => expr" myself, because unlike "fn", it makes it 
clear that this is a *new type of definition*, not just shorthand for an 
existing anonymous function. Of the other options, the C++ style also offers 
this, because you have to add the = or & to turn on the auto-capturing.

And to reiterate from previous discussions, it is the automatic capturing that 
is the biggest​ new feature here; it's a radical departure from every other 
scope in PHP, for better or worse.

Regards,

-- 
Rowan Collins
[IMSoP]

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

Reply via email to