Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115200 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49782 invoked from network); 28 Jun 2021 23:09:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Jun 2021 23:09:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BE7411804D9 for ; Mon, 28 Jun 2021 16:28:54 -0700 (PDT) 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, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 28 Jun 2021 16:28:54 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id w19so7187224lfk.5 for ; Mon, 28 Jun 2021 16:28:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ADpJWrnfZqvSUEIqMFxwrcOrvkuLFCIGDXdrOHdExKQ=; b=mPM54dy8whXnoWVPyw24Uf0GCNN9uBmU3YE2uTElxOmthGZGaX3yqwbxEPOxzOYmDU /JkRqLOP/6k7W8ylIbx44TYtnyT6ubR1L+wdXDWeVgoQPIloGZu/iNtreN8nBHeeMAQ4 F0M3tS9t5HFG7T0PEvJAs8ii9Xlv/piKZ5cKwyBYVoc0F75keMG8ngOsUtX5ieRfCR9V 3LD34wLhQiNu/egeZgREu/FcFbA/xEHP+X7CYnBrrEXTRZ6oxlIl7COmt+6KKR+WY/r/ 9HzsURdyJRdbHFTNrZ7XkW2+hbHhy5mYWksFvoVH85kbUOduc+iG0IA+h6s7uc66Beu1 EW4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ADpJWrnfZqvSUEIqMFxwrcOrvkuLFCIGDXdrOHdExKQ=; b=ox+Xqs8DL5K5GORQ41wr3aNAiA4AmKLXo+bXk5CfkKDUwuBQ9WVknqqw7i+U8SRfDT oObC9y/wCvvFpRxTBhMv0BBG89flPC14dvQNAm63lEP32uESnxuu4lZCP5XTEolvS5ad jOYnJ2SlJTXQlXqEgvTdGaoiQPUCkAjp38YuxvIyfilJo060IGZuRvwk4PP9dbf4O+VS AcQqPl6cyoFEQeTM0SGch0x9P/oJBPohvYP+1bPCnQ7xW2g9rOg+5X0XKH8RyXl8Rijk AS3f2lO5hAlz9hngMOCZJ2v5n6bbU41wNsnjsDUH8LHwSn3CG2xK0ibw3RW1mtHYdhuE LkqQ== X-Gm-Message-State: AOAM532yyP56Y3tnQgVJiOi+datIN9X0YS0MA8ysistnmiVf0CQFKPyF 9GQxWut/DmxwRq8KjpCsWOnQsK8z1Awiip1U0XI= X-Google-Smtp-Source: ABdhPJzacK7ggFF6a4yqReutvpu7rSaF1iHzqwrR/Jh9uq+31H9h0XiGBTiY39iQcd6NEPj/S36np0B9ZYYqaV8cDt8= X-Received: by 2002:a05:6512:3f82:: with SMTP id x2mr20018674lfa.421.1624922932736; Mon, 28 Jun 2021 16:28:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:7506:0:0:0:0:0 with HTTP; Mon, 28 Jun 2021 16:28:52 -0700 (PDT) In-Reply-To: <13476e3c-93d6-4c6f-be9e-24f46a5049fb@www.fastmail.com> References: <43d612c0-7462-463a-9536-ed5b66d9ae1e@www.fastmail.com> <13476e3c-93d6-4c6f-be9e-24f46a5049fb@www.fastmail.com> Date: Tue, 29 Jun 2021 01:28:52 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Pipe Operator, take 2 From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) > I talked with Joe about this, and the answer is no. Most of the complexity > comes from the initial "this is a function call, oops no, it's a partial > call so we switch to doing that instead", which ends up interacting with the > engine in a lot of different places. Once you've done that, supporting one > placeholder or multiple, variadics or not, etc. is only a small incremental > increase in complexity. Hm, I was thinking more about the conceptual complexity, not the implementation, but seems like the argument "cover all expected use-cases" was used too. :) So no half-measures... Thanks for your feedback. Olle >> > Overall, I really don't like the idea of special-casing pipes to change >> > what >> > symbol table gets looked up. >> >> Still wondering if this could be a per-file or per-library setting >> somehow, to opt-in into pipe behaviour when so desired. Or rather, to >> opt-in into this or that behaviour needed to do more idiomatic pipe. >> >> Here's one boilerplaty pipe: > > *snip* > > We're in the pipe thread here, not PFA. :-) And really, you're solving the > wrong problem. Pipes are trivial. They're only clunky because of PHP's > lack of decent callable syntax. PFA gives us that, but the engine makes the > implementation more complex than it seems like at first glance. > > Trying to come up with complex workarounds to make pipes pretty without > helping anything else is a fool's errand, especially when we have a working > PFA RFC that's about to end voting. (And right now is losing by a very slim > margin, but could pass if a few people change their minds.) > > Aside from something like Nikita's ...-only function reference RFC, which > only handles half the problem (it doesn't do anything to make multi-arg > functions work with pipes at all), any other solution is going to end up > reinventing PFA one way or another, or reinventing existing ugly user-space > libraries. one way or another > > I've not yet decided if I'm going to bring pipes to a vote if PFA doesn't > pass. I'm tempted to, but it would require rewriting all the RFC text back > to the uglier version without PFA, and yeah, it's not going to look as > pretty. And the main pushback a year ago when I first brought it up was > "PFA first, please, so the callable syntax isn't ugly." And... here we > are. > > --Larry Garfield