Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128182 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 D7CB61A00BC for ; Tue, 22 Jul 2025 20:03:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753214530; bh=SHU6VDsBS/KJZUh8WaHQrcfzBwWQq7JAcbr5QOO7AuY=; h=Date:From:To:In-Reply-To:References:Subject:From; b=gV+dUp4s99mYa5Csj735GvIRcmR59D1evdUWw4YhGXw8Oxc9ebpHUSLEdeu8VMJS5 4A6ltk+HaDnWTUU0fGn/s3/S1U4aiW8NXtwyr+1arEwOQzbOwz7kegZOf5tdJVaxcL LqDQzhWPWmrdCZ1YT//TKJMf74efubl6yHLrq8CycCihbIxB9i3Tlyo1bt5hrC2tHo dlGq7EVH5pdUeI6uLfvK7LGnreK0u0xsIjAvff2CePndYXF2RjHDAISjaG3KhiMm55 dHy+YCc95nJdh+EA5wX4W5fvSIbVh23QCxdUvrITO9AUEW7RYi8dTl9v5nF/+FU6xn R6y0Ss+TyKWEg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A015F180061 for ; Tue, 22 Jul 2025 20:02:09 +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.8 required=5.0 tests=BAYES_00,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.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (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, 22 Jul 2025 20:02:09 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id D2FB41D003C2 for ; Tue, 22 Jul 2025 16:03:53 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Tue, 22 Jul 2025 16:03:53 -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=fm2; t=1753214633; x=1753301033; bh=Uf+dgq+RDj4B2YgZijwOO /yBTpxYGHkLdF9LYMH5L+Y=; b=p5Ehu04DwKD6V0+Ioeb2b9HoPaSqQEVGsh/RC KeluMaePoMFFOXzFkbH5F8iSHx94dfdW60lckPEzRVYxlAVAb1OasZvcdaA6cBv/ 2bbBCGm9GQHbXlfZ1IU2GJV/y9aeCz4DiAsAZ9zzji2AW6jKd3MndoyCXn5CzmvG rvVwbf6+LVHJwRQj+pxhSb2gkC20I4EEbDg5u/1JpKqW71nBvUlkKSNSDDP/eQDM Jv5Yndz8SYKl0UYJEXMZURk4wKlAvTxEiPUFpWdpPAPhlpeJUHwdu0Fw1fA69OCt r237Wa1sffXxcmU6ehVPbyg2foVkkqxDh7tUfqXLlL/iIaNug== 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=fm2; t=1753214633; x=1753301033; bh=U f+dgq+RDj4B2YgZijwOO/yBTpxYGHkLdF9LYMH5L+Y=; b=Vp+/x5B3BdixRSugo KLlJ9wRzBLqaankWwY4S6gzzgC4WJKkhIF9peoHB8RGRHr4Ksmr/52aPVWTtBs/f eZigla/anWeqrQ9ub86/raWulytDuc4ZNry95FNNiOytoXPXrQoNUE6Lbs63UlAR sKuE6TUHjCH/QA6d4cgDk2WJErYTYnjZlC4OIxaDT/WYFNBxAzrbKVvU0Utkf/EU DQJjlKECmKYu55rggCZgPyuRfofmOXSxHPWVB5nOvrr9yWpbMTbxU95cTmkB1gX/ ZlHNR34WLLs1KrwKMdBPM2K4kwdqjHOfYI+wl1lMsgwwW4Z6/kpUfbL/w9pkjTL2 zRCRg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdejheekudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedfnfgrrhhrhicu ifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqne cuggftrfgrthhtvghrnhepueevvdduhffffffhleeuhedvjeevgfelgeetgefftedufeel heegfedvheegleetnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhgu thgvtghhrdgtohhmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 5EC6F700065; Tue, 22 Jul 2025 16:03:53 -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 X-ThreadId: T7b7d29473ae5162b Date: Tue, 22 Jul 2025 15:02:22 -0500 To: "php internals" Message-ID: <6cf2b42f-8cfd-49a0-bd73-35aedc54873c@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] Partial Function Application v2 Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Sat, Jun 28, 2025, at 12:06 AM, Larry Garfield wrote: > Hi folks. Arnaud and I would like to present take-2 at Partial > Function Application. > > https://wiki.php.net/rfc/partial_function_application_v2 > > It is largely similar to the previous PFA proposal from 2021, though > there are a number of changes. Most notably: > > * The implementation is simpler, because FCC already did part of the > work. This RFC can build on it. > * Constructors are not supported. > * But optional arguments and named placeholders are supported. > * It includes pipe-based optimizations. > > Note: We realize that this is a non-trivial RFC coming late in the > cycle. We are proposing it now because, well, it's ready now. If the > discussion goes smoothly, we're OK calling a vote on it for 8.5, > especially as it would complement pipes so well. If the discussion > runs longer, we're also OK with targeting 8.6 instead. We'll see how > that goes. > > Hi folks. Just a quick update: We've made one small change to the RFC. Specifically, in order to prevent accidentally calling optional arguments from callback locations like array_map() or array_find(), a partial created with foo(?) will ignore any additional arguments passed to it, and will not pass those through to the underlying function. A partial that uses foo(?, ...) will pass through whatever it gets. This is mainly to avoid passing an array key from those functions to a callback function that has an optional second parameter, which is not intended to get a key string. In practice this is what most people would expect would happen, but we're calling it out explicitly. (I'm not even sure it's a behavior change from what we had before, in practice.) cf: https://wiki.php.net/rfc/partial_function_application_v2#extraneous_arguments It seems the discussion has quieted down and wasn't particularly contentious to begin with (whew), so we're just about ready for a vote. However, Arnaud went on vacation and didn't remember to tell me when he'd be back. :-) So I'm going to wait a few more days just in case he has any last minute comments, but start the vote either when he returns or Monday the 28th, whichever comes first. (That gets the vote complete before the deadline for 8.5.) --Larry Garfield