Re: [RFC][Discuss] Arrow Functions
| From: | Yasuo Ohgaki | Date: | Tue, 31 Jan 2017 13:39:14 +0000 |
| Subject: | Re: [RFC][Discuss] Arrow Functions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98081@lists.php.net to get a copy of this message | ||
Hi Levi,
On Tue, Jan 31, 2017 at 8:38 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> 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.
I guess current PHP parser has to determine token type as they processed.
So distinguished keyword is needed. I don't have problem with the proposed
syntax. Large change is not preferred and current way should be faster.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net