Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119400 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 64012 invoked from network); 23 Jan 2023 16:50:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jan 2023 16:50:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0781F180548 for ; Mon, 23 Jan 2023 08:50:25 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 23 Jan 2023 08:50:24 -0800 (PST) Received: by mail-vk1-f175.google.com with SMTP id c21so6247057vkn.10 for ; Mon, 23 Jan 2023 08:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2Rw5uZ6tAEPCP2UhgOPxpU6N5JhhYFgWOMatjHKE8E8=; b=c3woJU4tQOoT6I2qHnWlWMRJj+FUP/sImjupHFXthLJnn49Dyz4rh4/D0dzMwcec8b eYcGLCuD9ahIl+sFXx6SlnjTBA+ZStOQG+cfrcnY9r6xA3rFYi5GyFmKImOJAP++++w7 cz3CYW+iv7J8dxoWsYIwtNEEvzJlw482XwqgnhjFOLeYmmEcgtOH+JV0kaM4VvH87g2i fWcMLvfb2w8XpBaS8ZkM8kXXHleqQms++831k8DTNZj9/LOwY7usI2kfEsvXX6Bz9le9 82IRG2682mrDP0CPmH8ikuLuHV7SeNU+WQkg+9WR8k7tVbgwMZVq20eZ8qP9OQtxwNZm m8gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2Rw5uZ6tAEPCP2UhgOPxpU6N5JhhYFgWOMatjHKE8E8=; b=JrvL34IaAUxLcRnRWXDC7oD0UlNFursZXls90d13mL46mgfcNezS+oIZGNZ/fvdYDR u21YKcBnRWP737lj5lhvp4pTGuFzoE0wwwZE/wb9hm1zAvs6b7AeiDLBXsTmUctTh20K CNvGJdit2lzNhgy3wpiKYBD/4vQLnrgxaenCYWiyD9CrZ5BVYWiNsUltkbHaGMWc7sFG 4S3w3EK3GTIahSNZE5H5ZJy82wSzO/3Eg4GkJt9kprJ5XE49JlrIhZUQQ1EmmHcL9HFK jg5b4oCTIoByTUO1324qGN4RFq7HBocoeAQvDACfWY7tG+skxpVqqyaZQPzsOLYWCNm7 2Oqw== X-Gm-Message-State: AFqh2kpAk8D6uEdWPIGKSUzm6FEuK52p4iVmskX+zbagEsSUZa/oRbB0 z5vAdnPeeMoYW0wz3R4vZ3siLYG85EZcmHl2Fq7BM29K X-Google-Smtp-Source: AMrXdXskzuvbnYb0kW9Iv/HRbz2MB91xcqgvaTwr5QdkLcwLXCbL1i8rvhyI93ZR6zYdG7pLeFxVW9Ebu4BEXfg7Q48= X-Received: by 2002:a05:6122:1185:b0:3e1:9b14:2c68 with SMTP id x5-20020a056122118500b003e19b142c68mr3284535vkn.37.1674492623767; Mon, 23 Jan 2023 08:50:23 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: Date: Mon, 23 Jan 2023 13:50:11 -0300 Message-ID: To: Ollie Read Cc: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Content-Type: multipart/alternative; boundary="00000000000004cf0c05f2f1325f" Subject: Re: [PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically From: deleugyn@gmail.com (Deleu) --00000000000004cf0c05f2f1325f Content-Type: text/plain; charset="UTF-8" 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 --00000000000004cf0c05f2f1325f--