Re: [RFC] Draft - Closure self reference
| From: | David Rodrigues | Date: | Fri, 20 Nov 2020 19:19:31 +0000 |
| Subject: | Re: [RFC] Draft - Closure self reference | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112267@lists.php.net to get a copy of this message | ||
> No we can't, try it (Parse error). The correct order is
> "function() use($x): Type".
Oh! You are right!
In this case, we still have the old idea:
function() as $lambda use ($x): int {}
> Ugh. That's ugly. I want to say we should fix it, but the horse has left
the stables, so it's too late to enforce the right (to me) ordering.
Yeah, but is there any way to go back now? :/
Atenciosamente,
David Rodrigues
Em sex., 20 de nov. de 2020 às 16:08, Sara Golemon <pollita@php.net>
escreveu:
> On Fri, Nov 20, 2020 at 12:58 PM Guilliam Xavier <
> guilliam.xavier@gmail.com> wrote:
>
>> > I don't know if that would be a problem, because today we can have it
>> > "function(): Type use($x)", so "Type use($x)"?
>> >
>>
>> No we can't, try it (Parse error). The correct order is
>> "function() use($x): Type".
>>
>>
> Ugh. That's ugly. I want to say we should fix it, but the horse has left
> the stables, so it's too late to enforce the right (to me) ordering.
>
> -Sara
>