Re: [RFC] Arrow functions / short closures

From: Date: Wed, 13 Mar 2019 20:56:31 +0000
Subject: Re: [RFC] Arrow functions / short closures
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-104699@lists.php.net to get a copy of this message
On 13/03/2019 20:37, Chase Peeler wrote:
Anyone considered? ($x) => $x * $multiplier I use this format a lot in javascript, so I like not having any indicator.
I can't remember which language it was, but they didn't even require the parentheses if there was only a single input: $x => $x * $multiplier;
I suggest you both read the RFC; about half the page is dedicated to summarising the syntaxes which have been considered, and the pros and cons of each. The summary of that syntax begins:
This is both the most popular and the most technically infeasible syntax.
Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#104699) next »