Re: Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically
| From: | Dan Ackroyd | Date: | Tue, 24 Jan 2023 10:29:28 +0000 |
| Subject: | Re: Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-119412@lists.php.net to get a copy of this message | ||
On Mon, 23 Jan 2023 at 23:03, Larry Garfield <larry@garfieldtech.com> wrote:
>
> So you're saying that would generate a callable equivalent to:
>
> $fnMethod = fn (Zok $zok, string $zebranky): Frungy => $zok->Pik($zebranky);
Yes.
> (We're also now rather far afield from the OP's request, I think.)
Well, yeah. Deliberately so.
Starting a discussion with a solution prevents people discussing and
agreeing on what the actual problems to be solved are, and fixates on
a single, in this case 'not great', solution.
As I said, I think people should say clearly what the problem they are
trying to solve first, before suggesting solutions.
> I'd probably push for something more compact as a syntax
Quite. Indeed. Yes.
Danack wrote:
>
> Well, other than to use a different syntax.
>
> https://news-web.php.net/php.internals/114542
$(Zoq, Pik);
cheers
Dan
Ack