Re: [RFC][Discuss] Arrow Functions

From: Date: Tue, 30 May 2017 15:09:11 +0000
Subject: Re: [RFC][Discuss] Arrow Functions
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-99266@lists.php.net to get a copy of this message
> Well, my preference would be for alternative 3. Not in favour of 2 & 4. > Nr 1 not so sure about and for nr 5, maybe tweak it to: > - [](params) ==> expr // binds no values > - [=](params) ==> expr // binds by value > - [&](params) ==> expr // binds by reference Can you explain why you want a longer arrow? > Leaving out [] could also be a default: > - (params) ==> expr // binds no values Or maybe that is why? > I presume then that the options discussed earlier "|params| => expr" > and "lamda(params) => expr" are of the table. The |params| => expr syntax is off the table, yes. I don't remember anyone taking the lambda(params) => expr suggestion seriously; my apologies if I'm simply remembering this incorrectly.

« previous php.internals (#99266) next »