Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97886 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86668 invoked from network); 19 Jan 2017 23:55:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2017 23:55:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=derokorian@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=derokorian@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-oi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:33653] helo=mail-oi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 15/E0-00729-4F151885 for ; Thu, 19 Jan 2017 18:55:33 -0500 Received: by mail-oi0-f42.google.com with SMTP id w204so34450119oiw.0 for ; Thu, 19 Jan 2017 15:55:32 -0800 (PST) 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=zyuinpVWXWcVBy/MZ2M7Z+kj9LOa1njHc6Y0LX6rVWQ=; b=BLYtfsYR1KYPBp3sCzonYE71ZCes907gIevn6mfgoyFH2RFswVVVsBIMk1hUbCuoAq YCFh786Uo28m6KAX16lQOStyB/WJFPczIwVeeEWx8bDG9O4Gpp2nGNJvkfZRdXxSVDXF auhozP0nmfCNDCuFv8VkDtypzAyJfbuEiPdfNHcGmlRkU4lXIyYLBxxGqpM4ljQnL83P ZG+PNsdxPGj2A1CmGmrBOAdVbs9VA/q23uKA3/mHYPkD9gnBI9lpJ5RRqZVtr9/HyLOe Son/SwmqNU3CG6s5zgnc+PYItLR1KFSwowBPGT1ydl76dHCDNx38TOgnSg65wUD3ui5r KBIw== 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=zyuinpVWXWcVBy/MZ2M7Z+kj9LOa1njHc6Y0LX6rVWQ=; b=fALls8i+K7w4o07oewLAq7Xb6TMEnUlq5NfmUWVW7LPFae2TqtOmP8S+8N26LTuLH+ bzdzEzSQvE6F8AHUOhcdg68MMBqLGA6Mb7S7P9Zh2le1kyd703oIpuqbT0NdthYpXZK2 pokEL5TIxlYp3NEl7jAwiOmg9DYXjVFs0FfvaZm4LjH4zn8nwsNS3/4uSFCnUxIdDwAA 1xMtr1MWSay1y3il+R6MYBg4vs6ZCRu3CEW0QjspcrMlvvPhikBEeQ2A9KFk80k0cMrE dl9AqkxZagk+qwBg2eQPyk44OY0BaQ0KU6mo+yxUEO2Gi5WHxP5z7D4i1cws+ZSomQeL b2og== X-Gm-Message-State: AIkVDXJ+Lo/5a96y76N5eh2rpU8MiLRiF3d5tL3lGgOvafCoJOs2+zxu2BrCsH53PZuFBZTdWIfJ0OPHLwtMuA== X-Received: by 10.202.97.137 with SMTP id v131mr5879006oib.86.1484870129685; Thu, 19 Jan 2017 15:55:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.43.143 with HTTP; Thu, 19 Jan 2017 15:55:29 -0800 (PST) In-Reply-To: <3258a209-0b4f-aba7-370f-2d7bc2dfddfc@gmail.com> References: <3258a209-0b4f-aba7-370f-2d7bc2dfddfc@gmail.com> Date: Thu, 19 Jan 2017 16:55:29 -0700 Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a113d40f29e18f405467b44f2 Subject: Re: [PHP-DEV] Pipe Operator v2 From: derokorian@gmail.com (Ryan Pallas) --001a113d40f29e18f405467b44f2 Content-Type: text/plain; charset=UTF-8 On Thu, Jan 19, 2017 at 4:08 PM, Rowan Collins wrote: > > > On 19/01/2017 22:17, Ryan Pallas wrote: > >> >> When you say assert the right hand side is callable, does that mean to >> call an object method, you would do [$obj, 'method']? What about >> functions, >> is it just the name like $str |> trim, or is it $str |> trim()? >> > > This is a good point. The difference between the pipe operator as proposed > by Sara and the combination of two separate operators is that in Sara's > proposal you'd always write this: > > $str |> trim($$) > > But in Levi's proposal as I understand it, the right-hand side is not > syntax, it's just constrained to be callable, so the simpler (but rather > ugly) form would be: > > $str |> 'trim' > See I don't like that at all, I hate having to put functions/methods in strings, as find usages and refactor tools generally don't find the strings. But sometimes I have to yield my preference to those who outrank me (aka those with voting power) --001a113d40f29e18f405467b44f2--