Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128071 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id C2F6E1A00BC for ; Tue, 15 Jul 2025 22:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752616985; bh=o/z0nO1H1AipM/YXBUoLixxd4IQSxGHQSlOqw2KKN0w=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=e0lMtn35arZzE54lvHO9YM5kL7eG+PwEY1/lZIzH5G69R+ZtyavWOzj8DWbhhezai YZ5o7xpfUUXJ2yDBd+rxlAQJE/NouwFcVNk9npJNWqdtfhZtmEsU6dSsHExnu7dPKP CqLZlc+rPzHUI0qy1Vkl4NOHKW5a2G8DjZ2Nek+T731k4S0+gKejcS7Ei3pIXblQ/3 +oyUjRiHS1KPw0eO+R7Xm1PON+NNdY+XwAwuYmS2DbbtKvLavf791RighVMkXd+eEC 58Mv78R5NOrEVxnkGcb05Lr+XiV6VPWvhebKgIO9xIa2lELHs/IA1GkRzXjAf/LkWs 5v0HE1FLYDjWA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 881F61804DE for ; Tue, 15 Jul 2025 22:03:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 15 Jul 2025 22:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1752617090; bh=GjnZ4uBVM32pfYDkkFgr5oxehD4zW4KEsDcgI086pK4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=HIURO2py7GtDqQnaBfzE0IG7tB5/bt2d7nGNJwnm9zD2vb30a2l413o8AlgO5cJmL pJx9rNgHrKmefIEHBY5OSePK8BBeMTrCtawvTucFmlCjSl/R5GzMwBKunSTczn8rQ8 NrvbBXRm+/AETJkkxqlaNQeYpFb2nBSOEPmpGRI2Aex9m5wxooWKNE+/bLqncwz4bY AfyMp5dByOQcgpqjXjEkLjHWtKcSmyPxJ4dnA/TYh0JXLhk/GJZEoo53cnWEwqw9Tf K10ght6/DNIYD+9e3+phEgBuXL7pBsgZqcLLRqcDlMUmNgS10ffvxo1ktVJeM2obe/ 6cFXrqWGGjZPg== Message-ID: Date: Wed, 16 Jul 2025 00:04:49 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] [VOTE] Single-Expression Functions To: Dmitry Derepko Cc: internals PHP References: <3cbe99a8-3415-45d3-aaf5-b5f921aab5e5@bastelstu.be> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 7/15/25 23:37, Dmitry Derepko wrote: > You’re right. I thought to shut down the RFC after absence of interest in the RFC, but Larry’s message reminded me that I should push it further to try to fit in the release cycle, which ends soon. The latest date to start a vote for PHP 8.5 would've been 2025-07-29 (i.e. two weeks from now). But even then, "trying to fit in the release cycle" should never be a reason to call a vote on an RFC where open issues and questions remain. Once something is voted into the language it's effectively impossible to get rid of it or fix it, since that would result in a breaking change. >> 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. > > In the purpose I’ve mentioned the function types that are going to be changed in the RFC. I’m sorry if I made in unclear. Help me to improve it. The vote on this RFC is already in progress, changing the RFC text other than to fix typos or other minor editorial errors is not okay, since that might invalidate any votes that have already been cast. >> 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. > > As I understand the RFC process, the implementation means nothing unless the RFC accepted. I wouldn't quite phrase it like this. The implementation does not need to be perfect, but it should certainly reflect what is actually being proposed in the RFC. As part of reviewing RFCs I'm also checking the implementation to find out (edge) cases where the RFC text could be improved to be more clear. Others are using the tests in the implementation as an additional source of examples. > So please, use the RFC document to understand the intent and discussions to find already answered questions. I've read the RFC and I feel that it doesn't adequately answer my questions. The most important part of an RFC is a precise definition of the proposed change, that is entirely missing from the RFC. The bulk of the RFC text is comparisons to existing syntax and examples. Providing a "user story" is something that should be in an RFC, but it's much less important than a precise definition of the proposal. Within the example section, it can also be helpful to include counter-examples which show error situations or something that is explicitly not part of the RFC. > Anyway, I’m open for the news ideas, improvements and questions. Hope it will help you to change the opinion. As outlined above, changing the RFC at this point is no longer possible. But even if the RFC text was clearer in what is actually being proposed, I'm reasonably positive that it would not change my mind regarding the cost/benefit ratio of the proposal. Best regards Tim Düsterhus