Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125874 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 qa.php.net (Postfix) with ESMTPS id 127E01A00BD for ; Wed, 30 Oct 2024 04:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1730262528; bh=d/cF27XJ/5nisQ+J/lF0PsUQah2WmlY/giAXOjq9YiY=; h=Date:From:To:In-Reply-To:References:Subject:From; b=gYTVB5sM7rvUyjgToUgf7WT9suFm993rq14WjunZVSBb+YXzmy5Quh3fwizv5DNpl uJmMuRdLPcbhQ6n4ZYqJeOy0DBfZ2HbC5eLbB60beW4Z1G+Ksa0uCwS43f/uIe6X8b gzqH5bclJ3jthgnH/RIMUBDSTmUr5feBS+S99Cm2JdyNgKeifRjMDvFXC4inAm4+MD j70YhzLyxE4Qsbg6SXgViDqW9GgQvSl9C2M/gcuGiAj2QEprQHb9wBhjtgDnjXcIEJ TWb/gqnzAI29BxtNrsEVTe6utGW+98MhKEE9aCgVS2eE4TfRrmfhRCj0CpEiwLh9fo DWKdZH1GfIr5w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 60F0D180056 for ; Wed, 30 Oct 2024 04:28:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151]) (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 ; Wed, 30 Oct 2024 04:28:45 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 2D5FC1140125 for ; Wed, 30 Oct 2024 00:26:17 -0400 (EDT) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-01.internal (MEProxy); Wed, 30 Oct 2024 00:26:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1730262377; x=1730348777; bh=3G2vArvvuwma9mgj509+0 CoBrUCYIM+S7QLTdir1+mg=; b=H+cv6kZoM9leMcqMzc6Hd0r8Gz5tNtfXvV/Kz NLG+OsTyRiyojgk9u1g1JX1bD+kg8pc+Cj+alHEE6D+S8Cq2DrCIqydR2V6nXjMD hdudYrJTgR0y9xG/XoFcbJHyUy/5ZyDYe+H9UNxuKn6Z1ryG3lT4I1eiJQ3zd3in ynXb69fQmyx6emXFmiRJi2hNk1jjVeP7+ZKJbJF9rZAzJrxXXHhNS1+1JQOJaRDQ iAkJu5y+/Tk8YxgWgTqadf+/qPd3qjwZ3tec7CzY8OA2fC/WrbZfpurjls2fV1h5 ptUpib3IfAdJbNGB+FPQGe+RkjrVBZou6cQbnPcFZ8HX/C+7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1730262377; x=1730348777; bh=3 G2vArvvuwma9mgj509+0CoBrUCYIM+S7QLTdir1+mg=; b=FslCci8C11Yn92JCe flKEDmqvymaEl2B8j40XrlqcAoiXlTEYuCYyp2yPGMCkHUJiYPE6A8PkJqlhiz63 vC7uCQBnG0cCTB6WYo/uexxjYBbN7jUpdRFlAH9JYZ0StqwIIR/awifo/0DcEIky UqxhgQQAfQZ79JzzUgKrWE+WH213xuPVqKjNhQIM5qwm5+ChFZNKwHPNw4BpkEU4 F8krLqIqINDHdzAM47mgGXoDMSz5diD+f5+qPs2zm6X2aSg2VDn0e/Qa1BFwGno+ Suo7WpkjSb/Y5KSuKNvGps9PJgROjilcf1RwuSAV0Pgx73jSfoVudFxVzlyFcA5I mAqIA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekvddgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthhqredtredtjeen ucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfih gvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpeeluddvudelkeeijeekueek gfdvieefleevveejfefhfedtuefgudeiueehffelkeenucffohhmrghinhepphhhphdrnh gvthdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsg gprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghr nhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 9A43129C006F; Wed, 30 Oct 2024 00:26:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 29 Oct 2024 23:25:55 -0500 To: "php internals" Message-ID: <3b458165-406c-4b70-97bc-6e98d6c44c72@app.fastmail.com> In-Reply-To: <15da4c13445d7e9c9d768c60c19768d4@bastelstu.be> References: <15da4c13445d7e9c9d768c60c19768d4@bastelstu.be> Subject: Re: [PHP-DEV] RFC: Support Closures in constant expressions Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Tue, Oct 29, 2024, at 10:11 AM, Tim D=C3=BCsterhus wrote: > Hi > > Volker and I would like to start discussion on our RFC to "Support=20 > Closures in constant expressions". > > Please find the following resources for your reference: > > - RFC: https://wiki.php.net/rfc/closures_in_const_expr > - Implementation: https://github.com/php/php-src/pull/16458 > > Best regards > Tim D=C3=BCsterhus This seems like a good idea to me. My only real question is why we need= to forbid short-closures. I fully agree that capturing variables for s= uch functions doesn't work. What I don't understand is why that preclud= es short-closures. Is it not possible to "just" say "there's nothing to= even capture in this context, don't try"? (There may be technical reas= ons for that, but I do not know what they are and the RFC doesn't say.) --Larry Garfield