Re: [RFC][Discuss] Arrow Functions

From: Date: Sat, 04 Feb 2017 03:06:46 +0000
Subject: Re: [RFC][Discuss] Arrow Functions
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-98162@lists.php.net to get a copy of this message
> On 4 Feb 2017, at 07:25, Aaron Piotrowski <aaron@trowski.com> wrote: > > $callback = |int|float $x| => $x ** 2; Forget the parser, you're giving my eyes diabetes trying to read that. As has been said before, PHP is relatively verbose compared to other languages. That makes it slightly more characters to type, but it also makes it absolutely clear what is happening. As Niklas said, all ambiguity/clarity issues are solved by using "function", at the cost of 6 characters. Suggesting that a search for arrow functions will be easier with <insert random character here> and then using grep (which could also easily match arrow functions using "function") as your example search seems odd to me.

« previous php.internals (#98162) next »