Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Chase Peeler
On Thu, Mar 25, 2021 at 10:38 AM Olle Härstedt wrote: > 2021-03-25 15:23 GMT+01:00, Christian Schneider : > > Am 25.03.2021 um 14:29 schrieb Mark Randall : > >> On 25/03/2021 09:28, Rowan Tommins wrote: > >>> That's not quite what I meant. I meant that you can't say "capture by > >>> default,

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Rowan Tommins
On 25/03/2021 16:24, Nuno Maduro wrote: Concerning the comments about what's exactly "auto-captured" by the scope of a multi-line short closure, we will be just reusing the "auto-capture" feature that already exists in one-line short closures. Therefore, this RFC doesn't have plans on changing

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Matthew Brown
On Thu, 25 Mar 2021 at 12:24, Nuno Maduro wrote: > Hi, > > Concerning the comments about what's exactly "auto-captured" by the scope > of a multi-line short closure, we will be just reusing the "auto-capture" > feature that already exists in one-line short closures. Therefore, this RFC > doesn't

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Nuno Maduro
Hi, Concerning the comments about what's exactly "auto-captured" by the scope of a multi-line short closure, we will be just reusing the "auto-capture" feature that already exists in one-line short closures. Therefore, this RFC doesn't have plans on changing the way "auto-capture" already works

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Matthew Brown
On Thu, 25 Mar 2021 at 10:23, Christian Schneider wrote: > Am 25.03.2021 um 14:29 schrieb Mark Randall : > > On 25/03/2021 09:28, Rowan Tommins wrote: > >> That's not quite what I meant. I meant that you can't say "capture by > default, but this variable is definitely local". > > > > I think if

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Olle Härstedt
2021-03-25 15:23 GMT+01:00, Christian Schneider : > Am 25.03.2021 um 14:29 schrieb Mark Randall : >> On 25/03/2021 09:28, Rowan Tommins wrote: >>> That's not quite what I meant. I meant that you can't say "capture by >>> default, but this variable is definitely local". >> >> I think if there's one

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Christian Schneider
Am 25.03.2021 um 14:29 schrieb Mark Randall : > On 25/03/2021 09:28, Rowan Tommins wrote: >> That's not quite what I meant. I meant that you can't say "capture by >> default, but this variable is definitely local". > > I think if there's one argument against, this would be it, but IMHO it is a

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Mike Schinkel
> On Mar 25, 2021, at 9:54 AM, Olle Härstedt wrote: > > 2021-03-25 14:29 GMT+01:00, Mark Randall : >> On 25/03/2021 09:28, Rowan Tommins wrote: >>> That's not quite what I meant. I meant that you can't say "capture by >>> default, but this variable is definitely local". >> >> I think if there's

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Olle Härstedt
2021-03-25 14:29 GMT+01:00, Mark Randall : > On 25/03/2021 09:28, Rowan Tommins wrote: >> That's not quite what I meant. I meant that you can't say "capture by >> default, but this variable is definitely local". > > I think if there's one argument against, this would be it, but IMHO it > is a

Re: [PHP-DEV] [RFC] Auto-capture multi-line closures andshortfunctions take 2

2021-03-25 Thread Mark Randall
On 25/03/2021 09:28, Rowan Tommins wrote: That's not quite what I meant. I meant that you can't say "capture by default, but this variable is definitely local". I think if there's one argument against, this would be it, but IMHO it is a weakness in PHP as a whole. The solution would be