Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97883 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67520 invoked from network); 19 Jan 2017 22:17:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2017 22:17:55 -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.43 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 209.85.218.43 mail-oi0-f43.google.com Received: from [209.85.218.43] ([209.85.218.43:36548] helo=mail-oi0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/0D-00729-11B31885 for ; Thu, 19 Jan 2017 17:17:54 -0500 Received: by mail-oi0-f43.google.com with SMTP id u143so33106667oif.3 for ; Thu, 19 Jan 2017 14:17:53 -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=Cogv6OJ4+IpFxWXu6dqG4vBkfKGmJfA2uqkQ5FXmgGo=; b=uIe+wtnlllmUP5varIYN7elJM74fkdAKO2FrVvD/ZcccFLYjF8Nyui4cHKAta8LRs5 dP91Y21o3fsnYcRtlP1GqGY1as5kn0lcTGxi+o3wlv4v59NOcfxqwxJ99nToHKccMaEi 8arjDkpbxCx9BcDCaxmxrWZGo1VE+78VDo6nAijqe+ED9PpVLfj0TXSsZUgLE6Xp06Bs 7I0JCsHQgsth5XrttDioY6UPyrbqsYX7fXTi3eidfARRdeyGC3P0iprc4adoqEeAvjQb iX+BZEmNY62YbZ4kmIvUj+cg9gmofe7Q29EoF6hR9cXJBCHoSdfbYw7FGb+prdHFja4j kz4Q== 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=Cogv6OJ4+IpFxWXu6dqG4vBkfKGmJfA2uqkQ5FXmgGo=; b=pMTfna5dHry/12+smjxgjBqczlsgCFRM5m+RwFBeCcFl5aidlnQRLF9E8AkO/Gba5v lCCOR87TNOmHaoR6KEhf+XAQDtwPYKiwpn97KZEPrdfeuwSlwu0I/MLdln5TVx7aX8ic 1hZ+Ge/w4MpEhawGwoEvhrCAIAedxgVdHbk68Byk46DVV1jF4lQvkvXhhC9HuDy1qwFu kGIyV4m8cUqqsoBU8NYzdeaYy5vNG+BwdvaINxC8idcb9kL0Z1dJ5O3cvMDp0KuX6Zhf ph/MYuHlAxZ44YP2U4OcpDqyh7lhRmWBOdFDT+POL/kjWYCMW1bzqSgJ7wElPXlIsNrG z0Vg== X-Gm-Message-State: AIkVDXJhswPcU7UQld41mhuK6zMansiKFLpIV7inZ4yMh84XFpkPgnf7hOQvaV58DHKZDl1hAcEpQoIBTGCdNw== X-Received: by 10.202.82.76 with SMTP id g73mr5615971oib.197.1484864270814; Thu, 19 Jan 2017 14:17:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.43.143 with HTTP; Thu, 19 Jan 2017 14:17:50 -0800 (PST) In-Reply-To: References: Date: Thu, 19 Jan 2017 15:17:50 -0700 Message-ID: To: Levi Morrison Cc: Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary=001a113d2cd866d4e9054679e7f1 Subject: Re: [PHP-DEV] Pipe Operator v2 From: derokorian@gmail.com (Ryan Pallas) --001a113d2cd866d4e9054679e7f1 Content-Type: text/plain; charset=UTF-8 On Thu, Jan 19, 2017 at 5:54 AM, Levi Morrison wrote: > On Wed, Jul 20, 2016 at 5:42 PM, Sara Golemon wrote: > > With the branching of 7.1, and after some reflection on the previous > > feedback, I'd like to reopen discussion of the Pipe Operator RFC > > https://wiki.php.net/rfc/pipe-operator which I had previously put on > > hold. I've changed much of the argument wording of the proposal, but > > not the substantive feature set. If you still feel it's unworkable, > > I'd like to encourage you to respond with what you think would make it > > workable (if anything). Thanks. > > > > -Sara > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > I've talked to you about this RFC off-list, but I figured I should > mention it on-list as well. I think we should make `|>` and `$$` two > independent operators that work well together (rather than only > together). > > The `|>` symbol would be the piping operator with these semantics: > > 1. Evaluate the left-hand side. > 2. Evaluate the right-hand side. Assert that the result is callable. > 3. Pass the result from 1. as the single argument to 2. > > 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()? Neither makes sense to me in the context of PHP since methods/functions are named objects, which is why when you pass a callback you have to give the string name of the function instead of just the name of the function, IE array_filter($arr, 'trim') vs array_filter($arr, trim). --001a113d2cd866d4e9054679e7f1--