Hi
On 7/15/25 19:56, Dmitry Derepko wrote:
RFC: https://wiki.php.net/rfc/single-expression-functions
Discussion: https://externals.io/message/127423
PR: https://github.com/php/php-src/pull/17677
Thank you for the RFC. It probably does not come entirely unexpected
that I voted against, given the feedback I provided during the
discussion in:
https://externals.io/message/127423#127577
I'd like to note that the start of the vote was very surprising to me.
As you acknowledged yourself, my email regarding open questions and
issues with the RFC has been left unanswered for more the a month and
then you started voting 15 minutes after your response and making
relevant changes to the RFC. This short of a time did not allow me (or
other readers) to carefully consider the latest changes, which is the
point of the discussion period.
In fact the
$a = function() => 123;
example that I mentioned in my email and that your response said
wouldn't be allowed as part of the RFC still is in the existing
proof-of-concept implementation.
The RFC text itself also doesn't clearly specify what changes are
proposed and instead just uses some handwavy language "This RFC
introduces a shorthand syntax for functions that consist of a single
return statement".
In other words: It's not clear to me what changes to the language would
happen, were this RFC accepted, since the RFC doesn't clearly specify
it. The implementation is not the source of truth (and contradicts your
response anways), unless explicitly specified in the RFC together with a
clearly specified revision.
Best regards
Tim Düsterhus