Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129043 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 0C40E1A00BC for ; Sat, 1 Nov 2025 17:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762019681; bh=8/TzQPyCj5tAuiJvGrTVT5duUHyhk+tlxBldtFXpKK4=; h=Date:From:To:In-Reply-To:References:Subject:From; b=XoYAMPWusvX3vlbmXjbjQl7bnCkMBsKpuaH4KSGcmFEgVd1l4esUWnIogOEPT1pvi GiPoEfS0C4Jt2RDi+qgjrf2i4H2ghvLifyGaxzDJ7UAgCJkFVZaxlQEmaT7lCkqpnR 13jftQ5h6v4Z5G8Coxlbx22MVu0pRtPD/NIAxobfpQ7zl1BJMaDvjI8m2ek0g1kKZT X6BkO7Sk8GJU5pOs4ZU1vz5OxWwATXaHYne/zfaEQZ8WQRKHJkYFUgFwfh/bAxBSft MJrQsa3vq8E3YpfqMlnypLC050jHLHVrjEMs1HfE5+IZRTuFRJdnfRwcAdOyHtBYvK /XBjawfrUpT6g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9ED4D18003F for ; Sat, 1 Nov 2025 17:54:40 +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: No X-Envelope-From: Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (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 ; Sat, 1 Nov 2025 17:54:40 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id C0C451D001BB for ; Sat, 1 Nov 2025 13:54:34 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Sat, 01 Nov 2025 13:54:34 -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=1762019674; x=1762106074; bh=cD0FCJAwWKMATThj6+Oaw puCiz5KqDtCqPE/u2C22i4=; b=dXn/GXkHiLsOjxN5z+s6p9PdkwnAo/a/6ijkS HDfcFpEYyOtDB7loXrs5W9A9lI/00b1AycLbLyKd87Ue+FXINWuW6ZXBMRdqXP4o r6uQ1DoCBhIbiZY6kdTq4CeQLwf87DJmmq9dgCp+Yu2pSM/LxjFFKIR11Im5AzCo b/JNx8xCnq0OoyRB+B/6LyQgxTSfKMkgxz+KE+xfLu5l2Fqev2Jtbknj5Hnf2BsN yNavDQsjGGG6Cw/IzqdJPIYUCqu0Rf1xsZUgaQZMo/N1FuXa6WzaA1g020y1lS8q 2Tl1/2IJhDJlz4RrCpnG5Mv1jTKNmgjn0rvpvgISu0Au0cNoQ== 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=1762019674; x=1762106074; bh=c D0FCJAwWKMATThj6+OawpuCiz5KqDtCqPE/u2C22i4=; b=0ll0H3BNyh0o1S7tb SdoGmFVC2smQQZAIxIXhPnhl4SR8OJYRoUGqv4BnegJxrcxF5vOXkRBCn/Xg6Q5e AcZeGYjU6T7ddI/Wor0p07QW+z1+4hI72MfZ8yWAO07l1UewlAyN/AiQ/HDmMpl1 PLh0uD3+VPuiu38Y+L/aG8ML3h3mm+2zLhS8kEvSW/XAM91HCfSg5MshItzIZrV5 7NuQgrjcpU0jIi6Svi+VvTwMKmclTY8jc8fN+rJE9eH/27Q8+o3i3JaF4h4+VxmI G3rdJAkWEwmve71kYaikDCxkIV9qqjIZpLTCyfK3P1TYP+Xm5IsAiqIFArXWKZNt fZQKA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddujeeftdefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeffieeivdfhvdeguddttdegteeiueegvefhteehfeeffeet udeitdehtdegjeeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtghp thhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsh eslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 3E23D700054; Sat, 1 Nov 2025 13:54:34 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: ATrodGnf_4Xg Date: Sat, 01 Nov 2025 12:54:12 -0500 To: "php internals" Message-ID: In-Reply-To: <5db2eea879a3bb5d9788a580f9588276@bastelstu.be> References: <13830641-0fb9-4de9-94ed-8873045ef820@app.fastmail.com> <5db2eea879a3bb5d9788a580f9588276@bastelstu.be> Subject: Re: [PHP-DEV] [RFC] Partial Function Application v2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Fri, Oct 31, 2025, at 4:22 AM, Tim D=C3=BCsterhus wrote: > Hi > > Am 2025-10-30 19:44, schrieb Larry Garfield: >> The one outstanding question is whether we allow reordering using nam= ed=20 >> arguments or preserve the underlying order. Arnaud says either one i= s=20 >> doable. So far, only 2 people have commented on it (favoring=20 >> reordering). We still want feedback from more people to see if there=20 >> really is a consensus one way or another. (2 people is too small a=20 >> sample size to draw any conclusions.) > > It appears there is a larger (and unanimous) agreement. This should be=20 > adjusted in the RFC then. Other than that, I've read through the RFC=20 > once more and have the following comments: Mm, yeah, it would appear I have been outvoted. :-) So be it. The RFC = has been updated to include reordering, and Arnaud will update the imple= mentation shortly. I expect this to be the last major change, so we'll likely call the vote= in a little over 2 weeks, baring any additional feedback. > 1. In the //// Regular functions //// examples: > > I believe the `static` is missing from every example. Given that the=20 > examples in the Overview at the start already have it, this might be a=20 > mistake? Artifact of how many times this RFC has been edited. :-) I think I got = them all now. > 2. // Placeholders may be named, too. Their order doesn't matter. > > This example will likely change given the reordering decision, but I'd=20 > like to note a typo: The 's' and 'i' parameters in the PFAs are missin= g=20 > their number. I ended up removing this example and replacing it with another anyway. > 3. (four(c: ?, d: 4, b: ?, a: 1))(2, 3); > > This is also a reordering example. Just listing it to make it easier f= or=20 > you to find. thumbs-up.gif > 4. Constant expressions > > I assume that =E2=80=9Cnested=E2=80=9D PFA will just work? A little mo= re complex example=20 > would be good, just to showcase what's possible. How about: > > public const BASE =3D 10; > > private \Closure $arrayToInt =3D \array_map(\intval(?, self::BASE= ),=20 > ?), > > My understanding is that this should be valid. Mine as well. I'll add that example, and if Arnaud corrects me we can d= eal with it then. :-) > 5. Implementation notes and optimizations > > // Transpiles into: > > The `static` should definitely be added here, since you are specifical= ly=20 > talking about internal details. > > 6. Scoping > > Seeing the scoping section: Is it possible to partial a `parent::` cal= l?=20 > I never tried with FCC. I... have no idea. Presumably? I'll add it and wait for Arnuad to yell= at me if not. :-) > All minor clarification bits. I'm super happy with the proposed=20 > semantics once the =E2=80=9Creordering=E2=80=9D question is resolved. Huzzah! --Larry Garfield