Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115532 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43712 invoked from network); 20 Jul 2021 14:28:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jul 2021 14:28:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CF0741804F4 for ; Tue, 20 Jul 2021 07:53:35 -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-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 ; Tue, 20 Jul 2021 07:53:35 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id e14so12951487ljo.7 for ; Tue, 20 Jul 2021 07:53:35 -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=1WH1OrVGpXQuez3IU7k23bytbOluBZX0g9XJB4X+0CU=; b=EQ0k3KCWyEE0Apt90A4mbY/0zKAC/FxFqkPVLpL7r9cvdzluyh6arGRYbfJ8JN/J+T Nulx5E6LBLdfXsaFBpoPCR8w4VfHcfppg3EyK2u+XwUJtmmwv+IbiufsG0uEeJg8Rb9p 1hFNDcpso/s22cO21hDs4uDv5QpronsZ6p4kyuqkMFc7ZESGTjuwJv5tdHLiR9nypnL3 0LWH2Ey93rjKpsc+NuwnVCyznmmfccPsfRTO1rjsg3duIH0BvrcWwvVNnNNtbgzc8Hgt FBTs1gmKtBaFgqhaZBAtA374OB8LJkDaLp69uBBx1Ai5IVpBMGMR+6dXzOLmlnwOQLk2 gMHQ== 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=1WH1OrVGpXQuez3IU7k23bytbOluBZX0g9XJB4X+0CU=; b=crPvdoZwG3tMQXTaAleRPFjVHnVPYl1VpeQdkFetwBRct51L1t6qggK8QhcONf50An rCxKkinS3Th7vGJsqeBzHm9S2Iw1i+vyWj6x6afCJCflONMth+GDbSkqzg9XRX3XV1RG hsVYe42K8wzIkaApTY+cI7ziVdTFmkOIKTjZ3QuUucIoA14yXCHr92V84r++G6RlwE3V xIvtYpEJzaVe4NbPwtJ0Es55jwyooUD05evqjRytX3Epm8fieO5yMT0ytHleBTNS1lik 97GzI9PRTYC7J0MtNLXovkefKRfMCm3EM5bE4f6Z36kb67pVcDoLidACSQWfFroowAKn 7j0A== X-Gm-Message-State: AOAM532MULOOAFGumpCPwabSSB8l5nQiw0x1uQYRcsz32JLfxHfwJmRi 6VI44pI0Sd9Apa0bw+Z9SXzywiI5KppbYwSTMYQ= X-Google-Smtp-Source: ABdhPJy2UJy3aZLsiqWfz8MUJqWxeWuCYDg86SfON4HED6vFEvXd4CTHWy0BbFs8aQ29Qm46joKX4372Ebicg+jZMVg= X-Received: by 2002:a05:651c:114a:: with SMTP id h10mr20362601ljo.367.1626792812091; Tue, 20 Jul 2021 07:53:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6504:30ac:0:0:0:0 with HTTP; Tue, 20 Jul 2021 07:53:31 -0700 (PDT) In-Reply-To: References: <6a2ef792-9624-4355-ad08-dcc7bfa5e19f@www.fastmail.com> <83bdd8d9-9962-4995-9aff-4bd9b6b7e9b9@www.fastmail.com> Date: Tue, 20 Jul 2021 16:53:31 +0200 Message-ID: To: Marco Pivetta Cc: Larry Garfield , php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [Vote] Pipe operator v2 From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) 2021-07-20 11:12 GMT+02:00, Marco Pivetta : > Hey Larry, > > On Sat, Jul 17, 2021 at 6:00 PM Larry Garfield > wrote: > >> Hi Marco. Thank you for your explanation, even if I naturally disagree. >> >> Out of curiosity, what sort of additional >> power/capability/flexibility/etc. would, in your mind, justify pipe or >> similar being a native feature? PHP has a *ton* of native features that >> *could* be done in user space, or are simply syntax sugar, but still >> wildly >> popular and useful as native syntax. What is your heuristic for that? >> >> (The fact that there are 3-4 user space implementations of pipe-like >> behavior, all incompatible, is one of the reasons why I think >> standardizing >> it into a common core syntax *is* a good idea, though I know others >> disagree.) >> > > I think the pipe operator as a **custom** operator made sense when we had > the entire discussion around placeholder parameters (`$$`) to be used in > the pipeline. > > As a plain "chain of functions with one input parameter and one output", it > makes little sense to have it as a custom construct, as it only adds > complexity to the AST. That is the idiomatic implementation, though. Hacklang is the odd man out with $$. Olle