Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2021-06-25 Thread Mark Tomlin
I really think that the implicit `match (true) {` is an easily understood behavior. On Fri, Jun 18, 2021 at 11:04 AM Guilliam Xavier wrote: > On Fri, Jun 18, 2021 at 4:24 PM Larry Garfield > wrote: > > > On Thu, Jun 17, 2021, at 1:49 PM, Mark Tomlin wrote: > > > Please excuse the year long bump

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2021-06-18 Thread Guilliam Xavier
On Fri, Jun 18, 2021 at 4:24 PM Larry Garfield wrote: > On Thu, Jun 17, 2021, at 1:49 PM, Mark Tomlin wrote: > > Please excuse the year long bump, but I was hoping to draw some more > > attention to the implicit "match (true)" case. I'm just a regular user of > > PHP, nothing too fancy, just one

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2021-06-18 Thread Larry Garfield
On Thu, Jun 17, 2021, at 1:49 PM, Mark Tomlin wrote: > Please excuse the year long bump, but I was hoping to draw some more > attention to the implicit "match (true)" case. I'm just a regular user of > PHP, nothing too fancy, just one of the many, many people around the world > who use PHP. When I

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2021-06-17 Thread Mark Tomlin
Please excuse the year long bump, but I was hoping to draw some more attention to the implicit "match (true)" case. I'm just a regular user of PHP, nothing too fancy, just one of the many, many people around the world who use PHP. When I first started using match statements, I thought it was a natu

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-28 Thread Ilija Tovilo
Hi Davey > I mean, ultimately, it's equivalent to: > > echo (function($match) { > if ($match === Lexer::T_SELECT) { > return $this->SelectStatement() > } > if ($match === Lexer::T_UPDATE) { > return $this->UpdateStatement() > } > if ($match === Lexer::T_DELETE)

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-28 Thread Ilija Tovilo
Hi Larry > > > My one question is why you're not including the implicit "match (true)" > > > in this version, when the secondary vote on the previous RFC was > > > 80% in favor of it. > > > > I received quite a bit of feedback that the RFC was too complex. I > > tried to make the RFC simpler by re

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-23 Thread Davey Shafik
On Fri, May 22, 2020 at 4:09 AM Ilija Tovilo wrote: > Hi internals > > I'd like to announce the match expression v2 RFC: > https://wiki.php.net/rfc/match_expression_v2 > > The goal of the new draft is to be as simple and uncontroversial as > possible. It differs from v1 in the following ways: > >

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-22 Thread Larry Garfield
On Fri, May 22, 2020, at 10:42 AM, Ilija Tovilo wrote: > Hi Larry > > > My one question is why you're not including the implicit "match (true)" > > in this version, when the secondary vote on the previous RFC was > > 80% in favor of it. > > I received quite a bit of feedback that the RFC was too

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-22 Thread Marco Pivetta
Hey Ilija, On Fri, May 22, 2020 at 1:08 PM Ilija Tovilo wrote: > Hi internals > > I'd like to announce the match expression v2 RFC: > https://wiki.php.net/rfc/match_expression_v2 > [...] > Given that many people have said without blocks they'd vote yes I'd > say this is the case here. Let me kn

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-22 Thread Ilija Tovilo
Hi Larry > My one question is why you're not including the implicit "match (true)" > in this version, when the secondary vote on the previous RFC was > 80% in favor of it. I received quite a bit of feedback that the RFC was too complex. I tried to make the RFC simpler by removing all non-essentia

Re: [PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-22 Thread Larry Garfield
On Fri, May 22, 2020, at 6:08 AM, Ilija Tovilo wrote: > Hi internals > > I'd like to announce the match expression v2 RFC: > https://wiki.php.net/rfc/match_expression_v2 > > The goal of the new draft is to be as simple and uncontroversial as > possible. It differs from v1 in the following ways: >

[PHP-DEV] [RFC][DISCUSSION] Match expression v2

2020-05-22 Thread Ilija Tovilo
Hi internals I'd like to announce the match expression v2 RFC: https://wiki.php.net/rfc/match_expression_v2 The goal of the new draft is to be as simple and uncontroversial as possible. It differs from v1 in the following ways: * Blocks were removed * Secondary votes were removed * optional