Re: [PHP-DEV] Empty subject in match and switch constructions

2025-02-02 Thread Larry Garfield
On Sun, Feb 2, 2025, at 7:40 AM, Ilija Tovilo wrote: > Hi Dmitrii > > On Sun, Feb 2, 2025 at 1:05 PM Dmitry Derepko wrote: >> >> I’m thinking about making match (true) and switch (true) be more lightweight >> by removing the subject “(true)” and making matching “true condition” by >> default. >>

Re: [PHP-DEV] Re: Discussion: making continue and break into an expression

2025-02-02 Thread Ilija Tovilo
Hi Dmitrii On Sun, Feb 2, 2025 at 2:36 PM Dmitry Derepko wrote: > > I had similar idea to make `break`, `continue` and `return` be expressions > instead of statements to simplify almost the same cases as Robert described > above. > > Grammar corrections in the PR. https://github.com/php/php-src

Re: [PHP-DEV] RFC: First Class Callables in constant expressions

2025-02-02 Thread Rob Landers
On Wed, Jan 22, 2025, at 15:35, Tim Düsterhus wrote: > Hi > > Volker and I would like to start discussion on our RFC to support "First > Class Callables in constant expressions". > > Please find the following resources for your reference: > > - RFC: https://wiki.php.net/rfc/fcc_in_const_expr >

Re: [PHP-DEV] Empty subject in match and switch constructions

2025-02-02 Thread Ilija Tovilo
Hi Dmitrii On Sun, Feb 2, 2025 at 1:05 PM Dmitry Derepko wrote: > > I’m thinking about making match (true) and switch (true) be more lightweight > by removing the subject “(true)” and making matching “true condition” by > default. > So $var = match (true) { … } can be used as $var = match { … }

Re: [PHP-DEV] RFC: First Class Callables in constant expressions

2025-02-02 Thread Tim Düsterhus
Hi Am 2025-01-31 23:36, schrieb Larry Garfield: Purely out of curiosity and for educational value, what was so complicated about it? I would have expected it to be straightforward. FCC internally are effectively treated as function calls with a funny parameter list. This means that all valid

[PHP-DEV] Re: Discussion: making continue and break into an expression

2025-02-02 Thread Dmitry Derepko
> On Jan 25, 2024, at 12:16 PM, Robert Landers wrote: > > Hello internals, > > Now that throwing is an expression, it allows for some very concise > programming. What are your thoughts on making a break/continue into an > expression as well? Hi! I had similar idea to make `break`, `continue`

Re: [PHP-DEV] RFC Karma Request

2025-02-02 Thread Ilija Tovilo
On Sun, Feb 2, 2025 at 2:26 PM Tim Düsterhus 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 re

Re: [PHP-DEV] RFC Karma Request

2025-02-02 Thread Tim Düsterhus
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? `

Re: [PHP-DEV] RFC Karma Request

2025-02-02 Thread Dmitry Derepko
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