Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128857 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 DDE8E1A00BC for ; Fri, 17 Oct 2025 08:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1760688655; bh=hL+IAnuXUTk0xYnN2Tk8d71Wdlj873Yr24/poo+VpsI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ky/S+cApXu3hFhfnKGoCmeDibhHavcVFosl9nzfZ3kJ4raL69R0ib3S2TPd7ibjGA S0ebfNQtlqQm4Cr92o4RC1RhMFDiG+V3/+WSzgH3U/qx1j/u/2Xj0fWOq+ziwaj8Wq jgEQ9qU/UCvg5GB2ytVMgJD8SskVClylaaJ0CdqUUgWtMCR6Al8c6SJwINu1lpmrZ/ FRULlSsb6UbhqZ1fnupzMwfgfY6ejXSCTiUgtdKNPHo729epT38FlJ3fuCknBaN7ZX DA0Efiirt2lLTPmmol2H6qgcxvn3z9Y3hGQrfExTcbLkoIwBeSvF1L3Hz+jYMVKTFO QiiV57qhZQ4sw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9F5EA1801D4 for ; Fri, 17 Oct 2025 08:10:54 +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: 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, 17 Oct 2025 08:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1760688647; bh=8/5WMydM/JUFIa32XdktV+8PJCkqzd2ERyViCmvD1Ss=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=HWpRvzrlgfTyFDLybLClPUDsElbkVDoQJuWZ/kh7uBkR3hFNd5O0Xu8mtPo/GAnmo bmkpekHlEOpF2vwRBPEpJeZEkQ0ydPHf9DZmaaQCfT+F0C1wNxR2mku3xCBnq8RV9o u/171a38/UYoUR7BAJTwfwyAXPk1+oFjfsaIUK6iJgvP9EEIazZA1kF2IcGkRzmyd0 s69DxvnrGj8FQQGWMtIhSW3WYq3Rume2rM+WK7XlzqVyiUkkAgQpJ30NYDZvmJMg1a p7U1pRV/Q8gf1A8Mhtc+od/O6bRzXY7oi3BPQqfKt13lx/YZs3+GxzCQGkktOLQLGJ xwihNdtPKurMw== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 17 Oct 2025 10:10:46 +0200 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] Partial Function Application v2 In-Reply-To: <17c4de1b-96bd-424f-b1ed-637cfc961464@app.fastmail.com> References: <13830641-0fb9-4de9-94ed-8873045ef820@app.fastmail.com> <17c4de1b-96bd-424f-b1ed-637cfc961464@app.fastmail.com> Message-ID: 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-13 20:23, schrieb Larry Garfield: > OK, there was a miscommunication between Arnaud and I. It is using the > variable name, not "args" already. Just with no _ and 0-based. I've > updated the RFC accordingly. Thank you! I noticed a small typo in one of the updated examples: $c = fn(int $i1, ?float $f3, Point $points0, Point $points`): string => things($i1, $f3, $points0, $points1); The second points parameter is misnamed. > We talked a bit more, and decided to tighten the rules further. I've > updated the RFC accordingly. Essentially, the first example is > correct, the second has been changed. > > If the underlying function is variadic, and ... is used in the PFA, > then it will accept an arbitrary number of arguments. In any other > case, only explicitly-specified arguments will be passed through. The RFC still says: // Whereas strictly speaking, a variadic placeholder is equivalent to this: $f = foo(1, ...); $f = fn(int $b, int $c): int => foo(1, $b, $c, $d, ...array_slice(func_get_args(), 3)); Did you miss updating that? This also makes me realize that this means that PFA will not actually be a strict superset of FCC, no? FCC always passes through all the extra arguments, whereas PFA will not (at least based on your reply). Best regards Tim Düsterhus