Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119401 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65376 invoked from network); 23 Jan 2023 16:53:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jan 2023 16:53:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 37AC4180539 for ; Mon, 23 Jan 2023 08:53:49 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,MISSING_HEADERS, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 23 Jan 2023 08:53:48 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6C7885C00E8 for ; Mon, 23 Jan 2023 11:53:48 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute1.internal (MEProxy); Mon, 23 Jan 2023 11:53:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ollie.codes; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to; s=fm3; t=1674492828; x=1674579228; bh=eSA2uZuyn19dn oRb8DqO2Wi0GfAgtssbSpQ7dajGAJ8=; b=TxqWkshQrhM+RgkClUfKvP7DfUaG5 EM+Fq1tNh9yhggeLQ4stgS7oJB+oqQCWApSnb4wAYhACfD/VQaMkWH7AZNE6gFFr YeQDzIks1Mj5T1DmXXA9DcgmiKRwCKVzePdb/ua/v4vRZub2xtrzvKDcaDyNzBaJ xgmlXMllAWU7Y9ymAzYVoRMUHT7X5nLc1klXv1kTEPrPNE/VKaR31gKe8ZDAsRTj SBGF2cOfL8oSZo2sTRX8bIcLL1p2MCzIzS2anTdnej02YESs1fcQJ87zuG4zEULh z56AleISiRWiCWJIybUO0njIhI6+arnNcR3HeJxblPeOtNfdD4e94zB1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1674492828; x=1674579228; bh=eSA2uZuyn19dnoRb8DqO2Wi0GfAg tssbSpQ7dajGAJ8=; b=DyV27WTfIXCqrfaQxvDXVkc336ayQ3Le8VtMPs1AfHyQ 7/KW8WqbzhvCP4PRi3zQ5XflcB+kCAWvRHzIS1JQQOWl4z0Udn38qlf8ekioXGaH y5ic+k3VqurHxVthlBc1NOOQQFfp66GfBt/XhPDjGfigkmzUUbavWgsp73CMasVC W8PqHJWgznIAZCymkUyY+x/Pir+W8uzm4rCsWcken+J655Iq5husiSZRqnSgsrWp ruDIS19PBo1pluXI8rSX/ezzGAAsnHwwMcsU1Uhjg+DxoQYr/4xL3F1aQ/yTvYYT Y969kM7cTCDjj/qimmzddZQcAFUt939jD5V1pWTYoA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddukedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenuchmihhsshhinhhgucfvqfcufhhivghlugculdeftd dmnecujfgurhepofgfggfkjghffffhvefutgesrgdtreerreertdenucfhrhhomhepfdfq lhhlihgvucftvggrugdfuceophhhphesohhllhhivgdrtghouggvsheqnecuggftrfgrth htvghrnhepheejfeekfefftdffudegueelieelgeffteelteejvdeuueegffdtvddujedv feeknecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepphhhphesohhllhhivgdrtghouggvsh X-ME-Proxy: Feedback-ID: i835c46d5:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3484436A0073; Mon, 23 Jan 2023 11:53:48 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-85-gd6d859e0cf-fm-20230116.001-gd6d859e0 Mime-Version: 1.0 Message-ID: In-Reply-To: References: <8f530a4a-bf48-4259-877e-16ebf8082936@app.fastmail.com> <88a59c46-9261-43f1-874d-ffc2f9caff32@app.fastmail.com> <99bc38dc-3d62-4a1e-a99c-e5daab3d779f@app.fastmail.com> Date: Mon, 23 Jan 2023 16:53:26 +0000 Cc: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Content-Type: multipart/alternative; boundary=94987300ec5444129cfbd34c536a3837 Subject: Re: [PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically From: php@ollie.codes ("Ollie Read") --94987300ec5444129cfbd34c536a3837 Content-Type: text/plain There's definitely similarity, but I would say it sits somewhere between the two. Rather than reference a partial method call, or create a closure for a method, you're delaying a method call. Or rather, referencing a method. We have the ::class pseudo property, so I see this like an equivalent, but for methods. On Mon, Jan 23, 2023, at 4:50 PM, Deleu wrote: > > > On Mon, Jan 23, 2023, 1:16 PM Ollie Read wrote: >> Oh, I didn't mean to suggest that it automatically binds. >> >> My second suggestion for how to achieve this does require some sort of automation. If you create a closure from Str::someMethod($arg1, $arg2) where someMethod isn't static, it should create a closure with the signature fn(Str $object, $arg1, $arg2), which would wrap a call to [$object, 'someMethod]($arg1, $arg2). > > I think this starts to wonders in the realm of Partial Function Application https://wiki.php.net/rfc/partial_function_application > --- Best Regards, *Ollie Read* --94987300ec5444129cfbd34c536a3837--