Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129017 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 7B9901A00BC for ; Fri, 31 Oct 2025 09:22:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1761902557; bh=BXvBxZqkQGHhTkxLqMxRiODoVwFfuoEM/35G/kiJob0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Zis2Lwlx6rATC3HSMuvBybzN2rWPoF/4wvQ5ZZ/EDhQt/IvpP+gQ/gbPnI1aWQhsR yQNDuijXho7nifwBMXOd2YPG6F9hrNnH4NSFk1vjUAm1GNMY3U93MJ/4HAVYDqAJXc gDDbAZya+QFb3ay5WtdM3Ct1WeH8jrkJJoTJOQyYsKVVeoQ20qiJRhklc/kRyAeShH 8GmdLvOFWYMRgOgP7DCvezEmO0WbguCuXUm0d29HrX7pr4lmNgzOd2Yx3untkEJVCu GOzHffTG2WMmxFFBHvrJYzSZocS4JG1uOsgKUlQhyFHWCfSrCWvLGb9s40lt8PceNg jxAT14M5WdVIw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 54B2E180041 for ; Fri, 31 Oct 2025 09:22:36 +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=-0.2 required=5.0 tests=BAYES_20,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: No 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 ; Fri, 31 Oct 2025 09:22:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1761902549; bh=oEFbaMjpfWB2LrvOFWagwmDGr18ovqRhehdoLBhL3KA=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=kYT+6gK1NYlrlET36o3hyRHomOd7pK8ePZE/J/dHehr3Mh1IvETyfOQD0Z8C3tXdT pzKptI4Xzodr+v4NZXyLLlh444YsgPUIfYizsRzcF2qDIyh7Kw7OPmKWR41/aMtE3+ 8JaXcsg3NDkUP0n6Lm97R/dIuPsOJRPAkSVXHyHY97qWSOUy8qX7qfMQmF/6rxGesa yjw87tOrKJxZn5Hx+ypg++8xzPGUeq0a4BhV4LHHFpVWumU1OMTKzgtwfhtLOvGgtv jqMI/ZgunTd1p+zn4BdfqIK9YPm/JdmO+/TXCkBIJD1OS//JPgAkzypxHGS5ryGTQG 5F+Ke8B3hoMcA== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 31 Oct 2025 10:22:29 +0100 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] Partial Function Application v2 In-Reply-To: References: <13830641-0fb9-4de9-94ed-8873045ef820@app.fastmail.com> Message-ID: <5db2eea879a3bb5d9788a580f9588276@bastelstu.be> 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 Am 2025-10-30 19:44, schrieb Larry Garfield: > The one outstanding question is whether we allow reordering using named > arguments or preserve the underlying order. Arnaud says either one is > doable. So far, only 2 people have commented on it (favoring > reordering). We still want feedback from more people to see if there > really is a consensus one way or another. (2 people is too small a > sample size to draw any conclusions.) It appears there is a larger (and unanimous) agreement. This should be adjusted in the RFC then. Other than that, I've read through the RFC once more and have the following comments: 1. In the //// Regular functions //// examples: I believe the `static` is missing from every example. Given that the examples in the Overview at the start already have it, this might be a mistake? 2. // Placeholders may be named, too. Their order doesn't matter. This example will likely change given the reordering decision, but I'd like to note a typo: The 's' and 'i' parameters in the PFAs are missing their number. 3. (four(c: ?, d: 4, b: ?, a: 1))(2, 3); This is also a reordering example. Just listing it to make it easier for you to find. 4. Constant expressions I assume that “nested” PFA will just work? A little more complex example would be good, just to showcase what's possible. How about: public const BASE = 10; private \Closure $arrayToInt = \array_map(\intval(?, self::BASE), ?), My understanding is that this should be valid. 5. Implementation notes and optimizations // Transpiles into: The `static` should definitely be added here, since you are specifically talking about internal details. 6. Scoping Seeing the scoping section: Is it possible to partial a `parent::` call? I never tried with FCC. -------------------- All minor clarification bits. I'm super happy with the proposed semantics once the “reordering” question is resolved. Best regards Tim Düsterhus