Re: [RFC][Discuss] Arrow Functions
| From: | Yasuo Ohgaki | Date: | Tue, 31 Jan 2017 11:38:53 +0000 |
| Subject: | Re: [RFC][Discuss] Arrow Functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98070@lists.php.net to get a copy of this message | ||
Hi Levi,
On Tue, Jan 31, 2017 at 2:55 AM, Levi Morrison <levim@php.net> wrote:
> This RFC proposes syntax and semantics to simplify this common usage to:
>
> fn($x) => $arr[$x]
>
Could you explain why fn() cannot be removed like ES2015.
Rowan's syntax sounds attractive to me if fn() cannot be removed.
fn($x => $x * 2)
Or since many of us like "function", it could be
function($x => $x * 2)
I don't have strong preference, but some may have.
I suggest separate vote into 2 votes.
- Introduce arrow function
- Prefered syntax
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net