Re: [RFC] Arrow functions / short closures
| From: | G. P. B. | Date: | Thu, 14 Mar 2019 17:25:08 +0000 |
| Subject: | Re: [RFC] Arrow functions / short closures | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-104721@lists.php.net to get a copy of this message | ||
On Thu, 14 Mar 2019 at 18:20, Josh Di Fabio <joshdifabio@gmail.com> wrote:
> On Thu, Mar 14, 2019 at 3:49 PM Rowan Collins <rowan.collins@gmail.com>
> wrote:
> >
> > Is it really that important to save two key strokes per closure?
> >
>
> I'd say that the (probably overwhelming) majority of arrow functions
> have a single parameter and, in those cases, the JS syntax saves four
> characters, ignoring whitespace. Another way of looking at it is that
> you have six characters of boilerplate with the fn() syntax versus two
> in JS (ignoring whitespace) for single param arrow functions.
>
No offense but at the end of the day having readable code is better than
shorter code IMHO,
so I don't really see the problem with having a couple of extra
character/keystrokes as this
is more readable then the massive boilerplate we currently have.
However, I can see people beeing fond of the concise syntax of JS
Best regards
George P. Banyard