Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93121 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60782 invoked from network); 9 May 2016 06:25:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2016 06:25:29 -0000 Authentication-Results: pb1.pair.com header.from=peter.e.lind@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=peter.e.lind@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.47 as permitted sender) X-PHP-List-Original-Sender: peter.e.lind@gmail.com X-Host-Fingerprint: 74.125.82.47 mail-wm0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:38663] helo=mail-wm0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/00-60415-75D20375 for ; Mon, 09 May 2016 02:25:28 -0400 Received: by mail-wm0-f47.google.com with SMTP id g17so167709099wme.1 for ; Sun, 08 May 2016 23:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/rggm/UFvvqIl5JpqntphvW+6Oa2qpvwpfYma6GfBu8=; b=o8swjearj+9mPdXkcqUgGc/ReGYNWD3ZoX6oKacgkJqg8PVnwFjDvhBMKryQMrOeqL Ly5T65GfEPmL8ugRvT6Yao9pr4CPeABsobuLHrv5rBQbVLKdaZEZGKIPRqeK+rFo3/1S +EsNXGbxbbjiZSZ9GWqsQxxTCghu+z3q7uNYOzoo0u5YRnEBVW9xTTQSc8q2w9A1cxYm fGm0Id/B3LccQ5uXG6/qYJzw/V9Y9UrVvHVgkVJVCbcXdPBX+vuX/3oHdfA9DbHrdDPT NIDhv1w5+MYrLTIo0p6sI8C37n24tAONURJplpetIgWVoHg3XekET/483BBLbX8Tc2Y9 XxuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/rggm/UFvvqIl5JpqntphvW+6Oa2qpvwpfYma6GfBu8=; b=QcHD9GiuLlFS+FqrALUGA/OVOYaodNwWjbr4t28qNVjYlvRuhKupAiJq5xe1QNpdqS biP5d9BTRUq7YukCiBNJYZLMU0Ek7pk4/9hITdK6ut9nHCpfI34DnrTmKDawj2c//rjC v2CXQYo++lMbQjZXK2M7awrifQPOWAMenlEwqh8R9h6bqzVbe/ovOeVXIgF+4eHBkjbb exmN6lqV3SJuBN9RNtbXZL8+uxu8l7qQuzWOvBBiUkzJvrBIWAZcLztyZ7CJCHRxmHg4 X2ELJ8JKbHZqqYZy79rwhfgO8Q4Qhsvk1QB38E7BYpL4VBcgm6G69pNOap/Mwp7wDNql InNQ== X-Gm-Message-State: AOPr4FWA/OTNynxKXOU1K3wx4dbGFoHhG/iO75SP94R30b5Jl+m0LZ/8Kb17EysOtcZ6aSSFwg3wNr85sxR2mA== X-Received: by 10.194.81.135 with SMTP id a7mr31222256wjy.170.1462775124368; Sun, 08 May 2016 23:25:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.105.38 with HTTP; Sun, 8 May 2016 23:25:04 -0700 (PDT) In-Reply-To: References: <4fc01507-3d07-2309-a4e4-4cad7325249b@gmail.com> <39071a01-a42c-0952-b3a8-b4769c79b56b@fleshgrinder.com> <0ac3be89-6fb4-610a-ef89-0928f264f96c@fleshgrinder.com> <71379db5-b7b8-78b3-ada5-eee34e6e22d6@fleshgrinder.com> Date: Mon, 9 May 2016 08:25:04 +0200 Message-ID: To: Stanislav Malyshev Cc: Yasuo Ohgaki , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bb70e1aaca324053262df20 Subject: Re: [PHP-DEV] [RFC] Pipe Operator From: peter.e.lind@gmail.com (Peter Lind) --047d7bb70e1aaca324053262df20 Content-Type: text/plain; charset=UTF-8 On 9 May 2016 at 07:37, Stanislav Malyshev wrote: > Hi! > > > "|>" is just a building block for simpler coding. It could be used > badly, but > > it helps a lot. Procedural code could be much simpler and readable with > "|>". > > I don't see how it helps anything. It just replaces clear variable names > with cryptic sequences of characters with no intuitive meaning and magic > semantics invented solely to save a few keystrokes. Moreover, it would > only in one sole use case where functions always return a value that is > immediately passed to the next one and is sole argument for it, and > never produce errors or require any logic beyond calling them in a > sequence on one value. > > That seems to be a misrepresentation of the proposal - the $$ is needed *because* there might be other parameters. As for sole use case - there are many pieces of code that manipulate the return values of functions, step by step. > > "|>" version is much easier to read and write. > > Quite the opposite. It has completely unobvious syntax (what is $$? What > is the value of $$? how I see this value if I need to debug this code?) > and does not allow to do anything but making code more cryptic. > I have the feeling that if everyone involved *explicitly* prefixed their opinions with "I think that", this would be a better and more fruitful discussion. *You* think the syntax completely unobvious - that doesn't make it so. Clearly others find it much easier to read. Regards Peter -- CV: careers.stackoverflow.com/peterlind LinkedIn: plind Twitter: kafe15 --047d7bb70e1aaca324053262df20--