Re: Fwd: [PHP-DEV] Arrow function expressions in PHP
| From: | Björn Larsson | Date: | Thu, 01 Oct 2015 12:34:01 +0000 |
| Subject: | Re: Fwd: [PHP-DEV] Arrow function expressions in PHP | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88604@lists.php.net to get a copy of this message | ||
Den 2015-10-01 kl. 11:47, skrev Pavel Kouřil:
Bob knows. It's discussed in the "[RFC] [Discussion] Short Closures" thread and I recall it was described as an ugly hack (abomination). Still Hack has the functionality with type-hinting, default values and simple syntax. Regards, //BjörnHow does hack solve this? Do they have backtracking in their parser? It was discussed earlier & Bob answered it, a T_LAMDA_OP is inserted by a token token-pre-parser before hitting the real parser, see: Subject: Re: [PHP-DEV] [RFC] [Discussion] Short Closures Date: Sun, 6 Sep 2015 17:59:57 -0700 From: Sara Golemon <php@golemon.com> To: Bob Weinand <bobwei9@hotmail.com> Copy: Björn Larsson <bjorn.x.larsson@telia.com>, PHP Internals <internals@lists.php.net> Regards //Björn Larsson(Resending, because I accidentally forgot to "Reply All".) So, if I'm understanding this correctly - this approach wouldn't require backtracking, and would make the simplest syntax possible? Regards PK Well, I don't know really being a userland developer, but I'm sure Sara &