Re: [PHP-DEV] RFC Karma Request

Hi Dmitrii

On Fri, Jan 31, 2025 at 3:10 PM Dmitry Derepko <xepozzd@gmail.com> wrote:

I’m looking for way to gain some Karma to create an RFC.
I’ve already made first implementation and shared it: feat: make `break`, `continue` and `return` be an expression by xepozz · Pull Request #17647 · php/php-src · GitHub

I can make 3 different RFC to discuss each change separately, let me know if it’s necessary.

RFC karma was granted. Good luck!

Note that I believe we should solve the technical issues mentioned on
the PR before voting on this RFC. They are very much non-trivial to
solve (I have tried multiple solutions over the years, all of which so
far were complex or otherwise unsatisfactory). But I would be ready to
investigate further, given that my long-standing RFC for match-blocks
[1] is also affected, at least in an unrestricted form.

Ilija

[1] PHP: rfc:match_blocks

Thank you, Ilija. I really appreciate it.

Could you please advise do I need to create RFC or it’s better do to it after solving technical issues?

If so, one common RFC or each for each operator: return, break, continue?

I’d also like to see all this problems by myself and I have a question. Is it possible to run php and add breakpoints somewhere at the parser and any other places? Is there an instruction how to profile it? Thanks


Best regards,
Dmitrii Derepko.
@xepozz

On Feb 1, 2025, at 1:04 AM, Ilija Tovilo tovilo.ilija@gmail.com wrote:

Hi Dmitrii

On Fri, Jan 31, 2025 at 3:10 PM Dmitry Derepko xepozzd@gmail.com wrote:

I’m looking for way to gain some Karma to create an RFC.
I’ve already made first implementation and shared it: feat: make `break`, `continue` and `return` be an expression by xepozz · Pull Request #17647 · php/php-src · GitHub

I can make 3 different RFC to discuss each change separately, let me know if it’s necessary.

RFC karma was granted. Good luck!

Note that I believe we should solve the technical issues mentioned on
the PR before voting on this RFC. They are very much non-trivial to
solve (I have tried multiple solutions over the years, all of which so
far were complex or otherwise unsatisfactory). But I would be ready to
investigate further, given that my long-standing RFC for match-blocks
[1] is also affected, at least in an unrestricted form.

Ilija

[1] PHP: rfc:match_blocks

Hi Dmitry

Please do not "top-post" on this list. Put your reply *below* the message you are quoting and ideally cut the quoted parts to the minimum. See below like I do:

Am 2025-02-02 10:28, schrieb Dmitry Derepko:

If so, one common RFC or each for each operator: return, break, continue?

`break` and `continue` should be bundled together, because they are so similar. I'd say that a single RFC (and thus a single discussion for all of them) is fine and that RFC can then contain two primary 2/3 majority votes for "Should return statements become expressions?" and "Should break and continue statements become expressions?".

Best regards
Tim Düsterhus

On Sun, Feb 2, 2025 at 2:26 PM Tim Düsterhus <tim@bastelstu.be> wrote:

`break` and `continue` should be bundled together, because they are so
similar. I'd say that a single RFC (and thus a single discussion for all
of them) is fine and that RFC can then contain two primary 2/3 majority
votes for "Should return statements become expressions?" and "Should
break and continue statements become expressions?".

Also don't forget about continue/breaks less popular cousin goto. :slight_smile:
It should at least be explained why it is or isn't included in the
RFC.

Ilija