Re: [PHP-DEV] Re: [RFC] Arrow functions / short closures

This is only part of a thread. view whole thread
  105228
April 10, 2019 23:43 rowan.collins@gmail.com (Rowan Collins)
On 10 April 2019 21:56:41 BST, "Björn Larsson" larsson@telia.com> wrote:
>Could then the \($x) syntax be a good compromise between >readability & implementation?
Personally, I don't find it "more readable"; on the one hand, it's one character shorter; on the other, it stands out less from everything else. My personal bias against it is that I'm too used to reading \ as "escape", so every time I see examples my first reaction is "what does an escaped parenthesis mean?" I'm sure I'd get used to it, but I prefer "fn" because it more immediately makes me think "function". Regards, -- Rowan Collins [IMSoP]
  105234
April 11, 2019 08:45 robehickman@gmail.com (Robert Hickman)
On Thu, 11 Apr 2019 at 00:43, Rowan Collins collins@gmail.com> wrote:
> > On 10 April 2019 21:56:41 BST, "Björn Larsson" larsson@telia.com> wrote: > >Could then the \($x) syntax be a good compromise between > >readability & implementation? >
This syntax does make sense to me, although only as I've seen it before in Haskell, which does something similar: https://wiki.haskell.org/Anonymous_function I think that people will get used to whatever becomes common.