Re: [PHP-DEV] [RFC][Draft] Match block

2023-09-13 Thread Levi Morrison
> 2. Support block expressions as a language-level concept, analogous to > https://doc.rust-lang.org/reference/expressions/block-expr.html This is my personal preference. As I mentioned in chat, if we go this route, there is a notable pain point: in "short" closures which have blocks, how do you c

Re: [PHP-DEV] [RFC][Draft] Match block

2023-09-12 Thread Larry Garfield
On Fri, Sep 8, 2023, at 10:16 PM, Ilija Tovilo wrote: > Hello everyone > > I've been working on match blocks over the last few weeks. > https://wiki.php.net/rfc/match_blocks > > I've already shared it in R11 and got conflicting feedback, which > makes me unsure on how to proceed. We have a few opti

Re: [PHP-DEV] [RFC][Draft] Match block

2023-09-10 Thread Deleu
On Sun, Sep 10, 2023 at 12:51 PM Rowan Tommins wrote: > On 10 September 2023 15:35:44 BST, Deleu wrote: > > ... until we manage to gather enough > >voters to overcome the "no-auto-capture" camp. > > > I think that's a rather adversarial / political way to put it. I believe > the aim of voting sh

Re: [PHP-DEV] [RFC][Draft] Match block

2023-09-10 Thread Rowan Tommins
On 10 September 2023 15:35:44 BST, Deleu wrote: > ... until we manage to gather enough >voters to overcome the "no-auto-capture" camp. I think that's a rather adversarial / political way to put it. I believe the aim of voting should be to measure consensus, not replace it. A more productive wo

Re: [PHP-DEV] [RFC][Draft] Match block

2023-09-10 Thread Deleu
On Fri, Sep 8, 2023 at 7:16 PM Ilija Tovilo wrote: > Hello everyone > > I've been working on match blocks over the last few weeks. > https://wiki.php.net/rfc/match_blocks > > I've already shared it in R11 and got conflicting feedback, which > makes me unsure on how to proceed. We have a few optio

Re: [PHP-DEV] [RFC][Draft] Match block

2023-09-10 Thread Rowan Tommins
On 8 September 2023 23:16:07 BST, Ilija Tovilo wrote: >Hello everyone > >I've been working on match blocks over the last few weeks. >https://wiki.php.net/rfc/match_blocks Hi Ilija, Thanks for working on this. A few initial thoughts... The use of "<-" as the new token doesn't fit the language

[PHP-DEV] [RFC][Draft] Match block

2023-09-08 Thread Ilija Tovilo
Hello everyone I've been working on match blocks over the last few weeks. https://wiki.php.net/rfc/match_blocks I've already shared it in R11 and got conflicting feedback, which makes me unsure on how to proceed. We have a few options. 1. Add blocks only to match, possibly adding blocks to other